Evaluates predictive performance of a one-compartment model
Source:R/evaluation.R
eval_perf_1cmpt.RdComputes predictive error metrics by comparing simulated and observed concentration–time data using specified pharmacokinetic parameters and dosing route.
Usage
eval_perf_1cmpt(
dat,
est.method = "rxSolve",
ka = NULL,
cl = NULL,
vd = NULL,
route = c("bolus", "infusion", "oral"),
ncores = 2
)Arguments
- dat
A data frame containing raw time–concentration data in the standard nlmixr2 format.
- est.method
Estimation method passed to the fitting function. Defaults to using
rxSolvefor model simulation and parameter estimation.- ka
Absorption rate constant.
- cl
Clearance value.
- vd
Volume of distribution.
- route
A character string indicating the route of administration. Must be one of
"oral","infusion", or"bolus". Defaults to"bolus".- ncores
Number of cores to use for parallelization, passed to
rxControl(). Default is 2.
Value
A numeric vector containing absolute prediction error, mean absolute error, mean absolute percentage error, root mean square error, and relative root mean square error.
Details
Internally selects the appropriate one-compartment model fitting function, using
Fit_1cmpt_oral() for oral administration and Fit_1cmpt_iv() for intravenous administration.
Predictive performance is quantified using the metrics.() function.