Learn R Programming

nlmixr2autoinit (version 1.0.0)

getsigmas: Estimate individual-level residual error from the elimination phase

Description

Performs log-linear regression on the elimination phase of a single individual's or one group's pharmacokinetic concentration–time data to estimate additive and proportional residual standard deviations.

Usage

getsigmas(group_df, nlastpoints = 3)

Value

A tibble with the following columns:

  • intercept: Intercept of the log-linear regression line

  • slope: Estimate of the terminal elimination rate constant

  • residual_sd_additive: Standard deviation of additive residuals

  • residual_sd_proportional: Standard deviation of proportional residuals

Arguments

group_df

A data frame for a single group (e.g., one subject or dose), containing columns: EVID (event ID), DV (observed concentration), TIME (time after dose), and routeobs (administration route).

nlastpoints

Integer specifying the number of terminal data points used for regression.

Author

Zhonghui Huang

Details

Residuals are computed from individual-predicted concentrations (IPRED) and observed concentrations (DV) using the following definitions: $$ \sigma_{add} = \sqrt{Var(C_{obs} - C_{pred})} $$

$$ \sigma_{prop} = \sqrt{Var\left(\frac{C_{obs}}{C_{pred}} - 1\right)} $$

where \(C_{obs}\) is the observed concentration and \(C_{pred}\) is the model-predicted concentration obtained by back-transformation of the log-linear regression. The additive residual standard deviation (\(\sigma_{add}\)) and proportional residual standard deviation (\(\sigma_{prop}\)) are calculated per individual.

Examples

Run this code
dat <- Bolus_1CPT
dat <- processData(dat)$dat
getsigmas(dat[dat$ID == 1 & dat$dose_number == 1 & dat$resetflag == 1 &
              dat$EVID == 0, ])

Run the code above in your browser using DataLab