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.
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)
A scalar or a vector of numerical time values.
A vector of system state values.
A vector of primary parameters.
A list of derived parameters, specified in the $DERIVED block of code.
The content of the R code specified within the $ODE block in the model file.
A data.frame of dosing information created by make.dosing
from instantaneous and zero-order inputs into the system and containing the
following columns:
Dosing event times.
State where the input should be assigned to.
Amount that should be assigned to system state at the
corresponding TIME.
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.
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.
A logical variable, indicating whether any input has to be assigned to a system state.
A vector of integers, indicating in which system state one or more doses have to be assigned to.
A matrix of covariate data extracted from the dataset.
A vector of system scale, typically returned by
input.scaling
An indicator whether checks should be performed to validate function inputs
A vector of times at which the system is being evaluated.
bij x 4 data.frame providing the instantaneous inputs for a treatment and individual.
fij x (4+c) data.frame providing the zero-order inputs for a treatment and individual.
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.
The content of the R code specified within the $OUTPUT block in the model file.
The content of the R code specified within the $DERIVED block in the model file.
The content of the R code specified within the $IC block in the model file.
The content of the R code specified within the $SCALE block in the model file.
A vector of initial conditions, typically returned by init.cond
A vector of parameters (primary+derived).
A vector of system state values, similar to y.
Sebastien Bihorel (sb.pmlab@gmail.com)
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.
dde.model