View source: R/npd_modelcodes.R
| Fit_1cmpt_oral | R Documentation |
Fits oral pharmacokinetic data to a one-compartment model with first-order absorption and first-order elimination using the naive pooled data approach. Supports multiple estimation methods provided by nlmixr2 and can optionally return only predicted concentrations to support efficient simulation workflows.
Fit_1cmpt_oral(
data,
est.method,
input.ka,
input.cl,
input.vd,
input.add,
return.pred.only = FALSE,
...
)
data |
A data frame containing oral pharmacokinetic data formatted for nlmixr2, |
est.method |
Estimation method to use in nlmixr2. Must be one of:
|
input.ka |
Initial estimate of the absorption rate constant (ka). |
input.cl |
Initial estimate of clearance (CL). |
input.vd |
Initial estimate of volume of distribution (V). |
input.add |
Initial estimate of the additive residual error. |
return.pred.only |
Logical; if |
... |
Additional arguments passed to |
If return.pred.only = TRUE, returns a data.frame
with a single column cp (predicted concentrations).
Otherwise, returns a fitted model object produced by nlmixr2.
Zhonghui Huang
dat <- Oral_1CPT
# Fit using 'nls'
Fit_1cmpt_oral(
data = dat,
est.method = "nls",
input.ka = 1,
input.cl = 4,
input.vd = 70,
input.add = 10
)
# Return only predicted concentrations
Fit_1cmpt_oral(
data = dat,
est.method = "rxSolve",
input.ka = 1,
input.cl = 4,
input.vd = 70,
input.add = 0,
return.pred.only = TRUE
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.