
Compute Fit Results
compute_fit_results.RdComputes all fitted results and residuals for GOF plots.
Arguments
- data
A data frame containing C-QT analysis dataset
- fit
An nlme::lme model object from model fitting
- dv_col
An unquoted column name for observed model dependent variable
- conc_col
An unquoted column name for observed Concentration measurements
- ntime_col
An unquoted column name for time points for measurements
- trt_col
An unquoted column name for treatment group, default NULL
Value
A tibble with observed DV, concentration, time, population/individual predictions (PRED/IPRED), and residuals (RES/IRES/WRES/IWRES)
Examples
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