Learn R Programming

nlmixr2autoinit (version 1.0.0)

eval_perf_1cmpt: Evaluates predictive performance of a one-compartment model

Description

Computes 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")
)

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.

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 rxSolve for 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".

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.

See Also

Fit_1cmpt_oral, Fit_1cmpt_iv, metrics.

Examples

Run this code

eval_perf_1cmpt(
  dat = Oral_1CPT,
  est.method = "rxSolve",
  ka = 1,
  cl = 4,
  vd = 70,
  route = "oral"
)

Run the code above in your browser using DataLab