
Compute Concentration for Upper Prediction
compute_conc_for_upper_pred.RdComputes the concentration needed for an upper conf_int prediction of the threshold value.
Usage
compute_conc_for_upper_pred(
data,
fit,
conc_col_name,
trt_col_name = NULL,
treatment_group = NULL,
threshold = 10,
conf_int = 0.9
)Arguments
- data
A data frame containing C-QT analysis dataset
- fit
An nlme::lme model object from model fitting
- conc_col_name
String of concentration (independent variable) column name
- trt_col_name
String of treatment group column name (optional, NULL for models without treatment)
- treatment_group
String of treatment group to make prediction for (optional, NULL for models without treatment)
- threshold
Value used as upper CI prediction, default = 10
- conf_int
Numeric confidence interval level (default: 0.9)
Value
Single numeric concentration value where upper CI crosses threshold. Returns NA with warning if no positive concentration is found.
Examples
mod <- fit_prespecified_model(
cqtkit_data_verapamil %>% preprocess(),
deltaQTCF,
ID,
CONC,
deltaQTCFBL,
TRTG,
TAFD,
"REML",
remove_conc_iiv = TRUE
)
compute_conc_for_upper_pred(
cqtkit_data_verapamil %>% preprocess(),
mod,
"CONC",
"TRTG",
"Verapamil HCL"
)
#> [1] 362.0367