Skip to contents

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.

Usage

pkpd_model(
  model,
  outputs,
  doses = list(),
  inputs = character(),
  known = character(),
  parameters = NULL,
  initial = list()
)

Arguments

model

An rxode2 model: a compiled rxode2 object, model code as a character string, or a model function with ini() and model() 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() and infusion_dose() specifications.

inputs

Names of known input signals (for example a plasma concentration Cp driving 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.

Value

An object of class pkident_model.

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