compute_fit_results.Rdcomputes all fitted results and residuals for GOF plots
compute_fit_results(data, fit, dv_col, conc_col, ntime_col, trt_col = NULL)A data frame containing C-QT analysis dataset
An nlme::lme model object from model fitting
An unquoted column name for observed model dependent variable
An unquoted column name for observed Concentration measurements
An unquoted column name for time points for measurements
An unquoted column name for treatment group, default NULL
a dataframe of predictions and residuals.
data_proc <- preprocess(cqtkit_data_verapamil)
fit <- fit_prespecified_model(
data_proc,
deltaQTCF,
ID,
CONC,
deltaQTCFBL,
TRTG,
TAFD,
"REML",
TRUE
)
compute_fit_results(data_proc, fit, deltaQTCF, CONC, NTLD)
#> # A tibble: 643 × 10
#> dv conc time PRED IPRED RES IRES WRES IWRES TRTG
#> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <chr>
#> 1 -6.00 0 0.5 -5.97 -6.15 -0.0329 0.153 -0.00532 0.0248 ""
#> 2 -12.1 0 0.5 -14.4 -12.4 2.30 0.292 0.373 0.0472 ""
#> 3 -5.54 0 0.5 -8.82 -6.94 3.28 1.40 0.530 0.226 ""
#> 4 -22.5 0 0.5 -36.7 -21.8 14.2 -0.722 2.30 -0.117 ""
#> 5 1.33 0 0.5 -4.37 0.515 5.70 0.811 0.921 0.131 ""
#> 6 -6.58 0 0.5 -6.22 -10.0 -0.353 3.46 -0.0572 0.559 ""
#> 7 -12.4 0 0.5 -26.1 -14.2 13.7 1.79 2.22 0.289 ""
#> 8 -11.1 0 0.5 -15.6 -9.95 4.46 -1.14 0.722 -0.185 ""
#> 9 -7.66 0 0.5 -7.11 -6.21 -0.557 -1.45 -0.0901 -0.235 ""
#> 10 -2.73 0 0.5 -22.5 -6.11 19.8 3.37 3.20 0.545 ""
#> # ℹ 633 more rows