Reads an ODE model through rxode2 and records, as symbolic expressions, the state equations, the observed outputs, the initial conditions, the known doses and input signals, and the unknown parameters. No identifiability decision is made here.
Arguments
- model
An rxode2 model: a compiled
rxode2object, model code as a character string, or a model function withini()andmodel()blocks (residual error lines containing~are ignored).- outputs
Names of the observed quantities: variables assigned in the model or state names.
- doses
A list of
bolus_dose()andinfusion_dose()specifications.- inputs
Names of known input signals (for example a plasma concentration
Cpdriving a pharmacodynamic model). Their values and time derivatives are treated as known.- known
Names of known constants (for example
DOSE).- parameters
Names of the unknown parameters to analyse. By default, every symbol that is not a state, an input, a known constant or time.
- initial
A named list of initial conditions as character expressions, for example
list(E = "kin/kout"). States without a dose or an initial condition start at zero.
Examples
m <- pkpd_model(
"d/dt(depot) = -ka*depot
d/dt(central) = ka*depot - CL/V*central
cp = central/V",
outputs = "cp",
doses = list(bolus_dose("depot", "F*DOSE")),
known = "DOSE"
)
m
#> <pkident_model>
#> States: depot, central
#> Outputs: cp
#> Parameters: CL, F, V, ka
#> Known: DOSE
#> d/dt(depot) = -ka*depot; depot(0) = F*DOSE
#> d/dt(central) = ka*depot - CL*central/V; central(0) = 0
#> cp = central/V