run_npd_2cmpt_iv: Run and evaluate a two-compartment IV model

View source: R/run_modelfit.R

run_npd_2cmpt_ivR Documentation

Run and evaluate a two-compartment IV model

Description

Fits a two-compartment intravenous pharmacokinetic model using a naive pooled data approach and evaluates model performance based on prediction error metrics.

Usage

run_npd_2cmpt_iv(
  dat,
  est.method = "nls",
  input.cl = exp(1),
  input.vc2cmpt = exp(1),
  input.vp2cmpt = exp(1),
  input.q2cmpt = exp(1),
  input.add = 1
)

Arguments

dat

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

est.method

Estimation method used in nlmixr2. Defaults to "nls".

input.cl

Initial estimate for clearance (CL). Defaults to exp(1), corresponding to a log-scale value of 1.

input.vc2cmpt

Initial estimate for central compartment volume (Vc). Defaults to exp(1), corresponding to a log-scale value of 1.

input.vp2cmpt

Initial estimate for peripheral compartment volume (Vp). Defaults to exp(1), corresponding to a log-scale value of 1.

input.q2cmpt

Initial estimate for intercompartmental clearance (Q). Defaults to exp(1), corresponding to a log-scale value of 1.

input.add

Additive error term. Defaults to 1.

Details

Rows with EVID == 2 are excluded prior to model fitting. The model is fitted using Fit_2cmpt_iv, and prediction-based metrics are calculated to assess performance.

Value

A list containing parameter estimates and prediction error metrics.

Author(s)

Zhonghui Huang

See Also

Fit_2cmpt_iv

Examples


run_npd_2cmpt_iv(dat = Bolus_2CPT,
                           input.cl = 4,
                           input.vc2cmpt = 35,
                           input.vp2cmpt = 35,
                           input.q2cmpt = 4)



nlmixr2autoinit documentation built on Nov. 14, 2025, 1:07 a.m.