ode.utils: Utility Functions for Ordinary Differential Equation Systems

Description Usage Arguments Details Author(s) See Also

Description

This is a collection of utility functions called by ode.model (and for some by dde.model when a model defined by ordinary (or delay) differential equations is evaluated. None of these functions is typically called directly by users.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
  ode.syst(t = NULL,
           y = NULL,
           parms = NULL,
           derparms = NULL,
           codeode = NULL,
           dosing = NULL,
           has.dosing = NULL,
           dose.states = NULL,
           covdata = NULL,
           scale = NULL,
           check = FALSE)
  create.intervals(xdata = NULL,
                   bolus = NULL,
                   infusion = NULL)
  de.output(f = NULL,
            parms = NULL,
            derparms = NULL,
            codeoutput = NULL,
            dosing = NULL,
            xdata = NULL,
            check = FALSE)
  derived.parms(parms = NULL,
                covdata,
                codederiv = NULL,
                check = FALSE)
  init.cond(parms = NULL,
            derparms = NULL,
            codeic = NULL,
            dosing = NULL,
            check = FALSE)
  input.scaling(parms = NULL,
                derparms = NULL,
                codescale = NULL,
                ic = NULL,
                check = FALSE)
  make.dosing(allparms = NULL,
              bolus = NULL,
              infusion = NULL,
              check = FALSE)
  init.update(a = NULL,
              t = NULL,
              dosing = NULL,
              scale = NULL)

Arguments

t

A scalar or a vector of numerical time values.

y

A vector of system state values.

parms

A vector of primary parameters.

derparms

A list of derived parameters, specified in the $DERIVED block of code.

codeode

The content of the R code specified within the $ODE block in the model file.

dosing

A data.frame of dosing information created by make.dosing from instantaneous and zero-order inputs into the system and containing the following columns:

TIME

Dosing event times.

CMT

State where the input should be assigned to.

AMT

Amount that should be assigned to system state at the corresponding TIME.

RATE

Rate of input that should be assigned to system CMT at the corresponding TIME. See vignette('scaRabee',package='scaRabee') for more details about the interpolation of the input rate at time not specified in dosing.

TYPE

An indicator of the type of input. TYPE is set to 1 if the record in dosing correspond an original bolus input; it is set to 0 otherwise.

has.dosing

A logical variable, indicating whether any input has to be assigned to a system state.

dose.states

A vector of integers, indicating in which system state one or more doses have to be assigned to.

covdata

A matrix of covariate data extracted from the dataset.

scale

A vector of system scale, typically returned by input.scaling

check

An indicator whether checks should be performed to validate function inputs

xdata

A vector of times at which the system is being evaluated.

bolus

bij x 4 data.frame providing the instantaneous inputs for a treatment and individual.

infusion

fij x (4+c) data.frame providing the zero-order inputs for a treatment and individual.

f

A matrix of time (first row) and system predictions. In the de.output function, the first row is deleted so that f has the same number of rows as in dadt defined in the $ODE or $DDE block.

codeoutput

The content of the R code specified within the $OUTPUT block in the model file.

codederiv

The content of the R code specified within the $DERIVED block in the model file.

codeic

The content of the R code specified within the $IC block in the model file.

codescale

The content of the R code specified within the $SCALE block in the model file.

ic

A vector of initial conditions, typically returned by init.cond

allparms

A vector of parameters (primary+derived).

a

A vector of system state values, similar to y.

Details

ode.syst is the function which actually evaluates the system of ordinary differential equations specified in the $ODE block.

create.intervals is a function that allows the overall integration interval to be split into sub-intervals based upon dosing history. This allows for the exact implementation of bolus inputs into the system. It determines the number of unique bolus dosing events there is by system state in dosing. It then creates the sub-intervals using these unique event times. If the first dosing events occurs after the first observation time, an initial sub-interval is added.

de.output is the function which evaluates the code specified in the $OUTPUT block and, thus, defines the output of the model.

derived.parms is the function which evaluates the code provided in the $DERIVED block and calculate derived parameters. It prevents primary parameters and covariates from being edited.

init.cond is the function which evaluates the code provided in the $IC block, and, thus, defines the initial conditions of the system.

input.scaling is the function which evaluates the code provided in the $SCALE block, and, thus, defines how system inputs are scaled.

make.dosing is the function which processes the instantaneous and zero-order inputs provided in the dataset and creates the dosing object. This function also implements absorption lags if the user included ALAGx parameters in parms or derpamrs.

init.update is a function that updates the system states at the beginning of each integration interval created by create.intervals to provide an exact implementation of bolus inputs into the system.

Author(s)

Sebastien Bihorel (sb.pmlab@gmail.com)

See Also

dde.model


scaRabee documentation built on Feb. 4, 2022, 5:07 p.m.