compute_summary_statistics_of_simulations.RdWrapper for calling compute_dataset_simulation nruns time and computing summary statsitics of the simulations
compute_summary_statistics_of_simulations(
data,
fit,
xdata_col,
conf_int,
nruns,
nbins,
type = 2
)A data frame containing C-QT analysis dataset
An nlme::lme model object from model fitting
An unquoted column name for xdata
Numeric confidence interval level (default: 0.9)
Integer number of simulations to run
Integer number of bins to break independent variable into - OR - a user specified vector for non-uniform binning
Algorithm for quantile. Default (2), is SAS quantile algorithm
a tibble of summary statistics of nruns worth of dataset simulations for a VPC.
data_proc <- preprocess(cqtkit_data_verapamil)
fit <- nlme::lme(
fixed = deltaQTCF ~ 1 + CONC,
random = ~ 1 | ID,
data = data_proc,
method = "REML",
na.action = "na.exclude"
)
compute_summary_statistics_of_simulations(
data = data_proc,
fit = fit,
xdata_col = CONC,
conf_int = 0.9,
nruns = 50,
nbins = 10,
type = 2)
#> # A tibble: 250 × 15
#> decile sim_num med_xdata med_pred low_pred high_pred mean_med_pred
#> <fct> <int> <dbl> <dbl> <dbl> <dbl> <dbl>
#> 1 [0,9.05] 1 0 -7.32 -19.4 3.35 -7.07
#> 2 [0,9.05] 2 0 -7.86 -20.7 3.98 -7.07
#> 3 [0,9.05] 3 0 -7.18 -20.3 5.10 -7.07
#> 4 [0,9.05] 4 0 -6.73 -20.1 4.82 -7.07
#> 5 [0,9.05] 5 0 -7.59 -19.4 3.61 -7.07
#> 6 [0,9.05] 6 0 -7.01 -18.6 3.72 -7.07
#> 7 [0,9.05] 7 0 -7.41 -19.4 5.76 -7.07
#> 8 [0,9.05] 8 0 -7.09 -17.7 4.85 -7.07
#> 9 [0,9.05] 9 0 -6.69 -19.2 6.19 -7.07
#> 10 [0,9.05] 10 0 -7.01 -19.3 3.22 -7.07
#> # ℹ 240 more rows
#> # ℹ 8 more variables: low_med_pred <dbl>, high_med_pred <dbl>,
#> # mean_low_pred <dbl>, low_low_pred <dbl>, high_low_pred <dbl>,
#> # mean_high_pred <dbl>, low_high_pred <dbl>, high_high_pred <dbl>