Learn R Programming

nlmixr2autoinit (version 1.0.0)

run_graphcal: Run graphical analysis of pharmacokinetic parameters

Description

Performs graphical estimation of pharmacokinetic parameters based on pooled concentration–time data and the specified route of administration.

Usage

run_graphcal(
  dat,
  route,
  dose_type = c("first_dose", "repeated_doses", "combined_doses"),
  pooled = NULL,
  pooled_ctrl = pooled_control(),
  ...
)

Value

A list containing graphical estimates of key pharmacokinetic parameters.

Arguments

dat

A data frame containing raw time–concentration data in the standard nlmixr2 format.

route

Route of administration. Must be one of bolus, oral, or infusion.

dose_type

Specifies the dosing context of the pharmacokinetic observations. 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

Optional pooled dataset. If NULL, pooling is performed internally.

pooled_ctrl

Control settings created by pooled_control() for time binning and pooling.

...

Additional arguments passed to graphical calculation functions.

Author

Zhonghui Huang

Details

The function pools individual profiles using get_pooled_data() when needed, and then applies route-specific graphical methods (graphcal_iv or graphcal_oral) to estimate parameters such as clearance, volume of distribution, terminal slope, and absorption rate constant (for oral data).

See Also

graphcal_iv, graphcal_oral, get_pooled_data

Examples

Run this code
# Example 1 (iv case)
dat <- Bolus_1CPT
dat <- processData(dat)$dat
run_graphcal(dat, route="bolus")

# Example 2 (oral case)
dat <- Oral_1CPT
dat <- processData(dat)$dat
run_graphcal(dat, route="oral")

# Example 3 (infusion case).
# Approximate calculation. only use when the infusion duration is very short

dat <- Infusion_1CPT
dat <- processData(dat)$dat
run_graphcal(dat, route="infusion")

Run the code above in your browser using DataLab