Learn R Programming

nlmixr2autoinit (version 1.0.0)

calculate_cl: Calculate clearance using an adaptive single-point method

Description

Calculates clearance using an adaptive single-point pharmacokinetic method

Usage

calculate_cl(
  dat,
  half_life = NULL,
  dose_type = NULL,
  pooled_ctrl = pooled_control(),
  ssctrl = ss_control()
)

Value

A list containing:

  • dat: the processed dataset with steady-state identification

  • cl_df: individual clearance estimates

  • trimmed_mean_cl: the population clearance calculated as a trimmed geometric mean with a 5 percent trimming level to reduce the impact of outliers

Arguments

dat

A data frame containing pharmacokinetic data. Required columns typically include ID, TIME, DV, tad, recent_ii, dose, routeobs, and durationobs.

half_life

Optional numeric value for the drug's half-life. If not provided, half-life is estimated using get_hf() from pooled observations.

dose_type

Specifies the dosing context of the pharmacokinetic observations. Required when half_life is not provided. Classified as first_dose, repeated_doses, or combined_doses based on whether observed concentrations occur following the first administration, during repeated dosing, or across both contexts.

pooled_ctrl

Optional list of control parameters used by get_pooled_data() for pooling observations. Defaults to output from pooled_control().

ssctrl

A list of control parameters generated by ss_control() to guide the detection of steady-state observations.

Author

Zhonghui Huang

Details

Estimates individual and population clearance from steady-state pharmacokinetic data. If half-life is not provided, it is estimated from pooled data using get_hf() and pooling rules defined in pooled_control().

The procedure:

  • Identifies steady-state observations using is_ss() and ss_control() criteria.

  • Selects peak and trough concentrations within each dose interval to represent steady-state behavior.

  • Classifies concentration points as Cssmax, Cssmin, or Cssavg based on timing within the interval and decay pattern.

  • Computes individual clearance as Dose / (Cssavg × tau).

  • Aggregates individual clearance values using a trimmed geometric mean to obtain a population estimate.

Supports bolus, infusion, and oral administration routes.

See Also

get_hf, get_pooled_data, pooled_control, is_ss, ss_control, trimmed_geom_mean

Examples

Run this code
dat <- processData(Bolus_1CPT)$dat
calculate_cl(dat, get_hf(dat)$half_life_median)$trimmed_mean_cl

Run the code above in your browser using DataLab