compute_fit_results
Description
computes all fitted results and residuals for GOF plots
Usage
compute_fit_results( data, fit, dv_col, conc_col, ntime_col, trt_col = NULL)
Arguments
Name | Description |
---|---|
data | A dataframe of QTc dataset |
fit | model fit |
dv_col | an unquoted column name of observed model dependent variable |
conc_col | an unquoted column name of observed Concentration measurements |
ntime_col | an unquoted column name of time points for measurements |
trt_col | an unquoted column name of treatment group, default NULL |
Returns
a dataframe of predictions and residuals.
Examples
data <- preprocess(data)
fit <- fit_prespecified_model( data, deltaQTCF, ID, CONC, deltaQTCFBL, TRTG, TAFD, "REML", TRUE )
compute_fit_results(data, 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.01 0 0.5 -6.01 -6.17 0.00251 0.158 0.000408 0.0256 "" 2 -12.0 0 0.5 -14.3 -12.4 2.30 0.355 0.374 0.0577 "" 3 -5.45 0 0.5 -8.72 -6.90 3.28 1.45 0.533 0.236 "" 4 -22.5 0 0.5 -36.5 -21.7 14.0 -0.755 2.27 -0.123 "" 5 1.29 0 0.5 -4.41 0.562 5.70 0.731 0.926 0.119 "" 6 -6.54 0 0.5 -6.20 -9.89 -0.337 3.35 -0.0547 0.545 "" 7 -12.5 0 0.5 -26.0 -14.2 13.5 1.71 2.20 0.278 "" 8 -11.0 0 0.5 -15.5 -9.96 4.46 -1.07 0.724 -0.173 "" 9 -7.72 0 0.5 -7.11 -6.21 -0.607 -1.51 -0.0985 -0.245 ""10 -2.76 0 0.5 -22.4 -6.11 19.7 3.35 3.19 0.543 ""# ℹ 633 more rows