algebraic: Initialize a structural model using algebraic equations.

Description Usage Arguments Value Note

View source: R/algebraic.R

Description

Initialize a structural model using algebraic equations.

Usage

1
algebraic(fun, inits = NULL, na.rm = TRUE)

Arguments

fun

function with named arguments. The first argument is always 'time' (a numeric vector), the other arguments may be the initial state, the regimen (TIME, AMT, II, ADDL, RATE, DURATION, CMT, SS), or the covariates or parameters (remaining arguments). These are all single numbers.

The initial values should be viewed as 'initial value at dosing time 'TIME'. 'AMT' may be NA, which is seen as a change in covariates (rather than a new administration).

The function returns a named list with numeric vectors of size 'time' or size '1'.

inits

named numeric vector with the initial states for the model These states should also be present in the output list of the function.

na.rm

time-varying covariates result in a new call to the prediction function, using AMT=NA. If TRUE, any AMT=NA is changed by AMT=0. Some models apply special rules when a new dose is applied. They may set this switch to FALSE to receive AMT=NA for when a time-varying covariate changes (but no actual treatment occurs).

Value

An algebraic prediction model

Note

Algebraic functions are assumed to be dose-linear, meaning that they can be calculated for a single dose and then summed up for multiple doses.


tdmore-dev/tdmore documentation built on Jan. 1, 2022, 3:21 a.m.