Skip to contents

Generates table of model parameter estimates and statistics.

Usage

tabulate_model_fit_parameters(
  fit,
  trt_col_name = "TRTG",
  tafd_col_name = "TAFD",
  id_col_name = "ID",
  conf_int = 0.95,
  decimals = 2,
  show_standard_error = FALSE,
  scientific = TRUE,
  title = NULL,
  ...
)

Arguments

fit

An nlme::lme model object from model fitting

trt_col_name

A string of column name of trt used in model fitting

tafd_col_name

A string of column name of tafd used in model fitting

id_col_name

A string of column name of id used in model fitting for random effects

conf_int

Numeric confidence interval level (default: 0.9)

decimals

Number of decimals to format table to, default is 2

show_standard_error

Logical, whether to display standard error of fixed effects estimates

scientific

Logical, whether to use scientific notation for small values

title

Optional string for adding tab_header. It will be wrapped in gt::md()

...

Optional additional arguments for gt::tab_options

Value

A gt table with fixed effect estimates, standard errors, confidence intervals, and p-values

Examples

data_proc <- preprocess(cqtkit_data_verapamil)
fit <- fit_prespecified_model(
  data_proc,
  deltaQTCF,
  ID,
  CONC,
  deltaQTCFBL,
  TRTG,
  TAFD,
  "REML",
  TRUE
)

tabulate_model_fit_parameters(fit, "TRTG", "TAFD", "ID")
Parameters Estimate [95% CI] p-value
Intercept −8.75 [−1.34 × 101, −4.10] 2.36 × 10−4
CONC 7.85 × 10−3 [−8.61 × 10−3, 2.43 × 10−2] 3.49 × 10−1
deltaQTCFBL −6.49 × 10−1 [−7.27 × 10−1, −5.70 × 10−1] 2.53 × 10−49
Verapamil HCL 2.77 [1.50, 4.05] 2.18 × 10−5
1 HR 4.08 [1.45, 6.71] 2.39 × 10−3
1.5 HR 2.25 [−3.67 × 10−1, 4.87] 9.17 × 10−2
2 HR 6.67 [4.05, 9.29] 7.38 × 10−7
2.5 HR 5.60 [2.98, 8.23] 3.21 × 10−5
3 HR 2.96 [3.24 × 10−1, 5.59] 2.78 × 10−2
3.5 HR −4.16 × 10−1 [−3.07, 2.23] 7.58 × 10−1
4 HR 1.50 [−1.17, 4.17] 2.70 × 10−1
5 HR −4.94 × 10−1 [−3.17, 2.18] 7.17 × 10−1
6 HR 1.16 [−1.53, 3.85] 3.96 × 10−1
7 HR −2.03 × 10−1 [−2.90, 2.49] 8.83 × 10−1
8 HR −8.59 × 10−1 [−3.56, 1.85] 5.33 × 10−1
12 HR −4.18 [−6.90, −1.47] 2.60 × 10−3
14 HR −2.98 [−5.70, −2.58 × 10−1] 3.19 × 10−2
24 HR 1.62 [−1.12, 4.37] 2.46 × 10−1
IIV(Intercept) 1.01 × 101 [7.22, 1.40 × 101]
Residual Error 6.18 [5.84, 6.54]