calcFirstVariations.Rd
Calculates the first variational matrix of the given model, that is, the first order derivatives of the model outputs with respect to the model parameters, at given times. This is tailored for use with the sensitivity and aliasing methods. Therefore model parameters are assumed to be given directly, rather than as a combination of population and individual parameters, and residual error parameters are not included.
calcFirstVariations(
model,
parms,
init,
outputPred,
times,
varp = names(parms),
symbolic = TRUE,
chkModel = TRUE,
...
)
Function(t, y, p) of time, state variables and parameters, specifying the differential equations. This function should return the numeric vector dy/dt.
Parameter values, as named numeric vector. May be NULL
if none are needed
(but then no derivatives will be calculated).
Function(p) of parameters specifying the initial state (at time 0) of the model.
Function(y, p) of state variables and parameters specifying the model prediction, i.e., the output without residual. This function should return a numeric vector.
Numeric vector of times where variations are to be evaluated. Should all be >= 0, but do not need to include the dose time 0.
Vector of names of parameters for which variations are to be calculated.
Should be a subset of names(parms)
, or NULL
for none.
By default equal to names(parms)
.
TRUE
(default) if derivatives are to be computed symbolically, FALSE
if numerically.
See calcVariations
for details.
TRUE
(default) if it has to be checked whether model components (model
, parms
, init
, outputPred
)
are formatted correctly for symbolic manipulation, FALSE
if not.
Named arguments to be passed to lsoda
.
Can be used for example to pass events or error tolerances.
A data frame with columns 't' for time, 'i' for the index of the output element, 'y' for the outputs,
and 'dy/d<v1>' for the first derivatives.
In the column names, variable v1 is replaced by the names in varp
.
The data frame has an attribute 'theta' listing the variables in parms
as a named vector,
and 'eta' and 'eps' that are empty.
The 'type' attribute is set to 'VariationalMatrix', 'secOrd' to FALSE
, and 'symbolic' to the value of
symbolic
.
The variational matrix is not normalized, as reflected in the attributes 'parameterNormalized' and 'outputNormalized',
that record input and output normalization, respectively.
The attribute 'parameterNormalized' is set to a named boolean vector of FALSE
, with the parms
names as names.
The attribute 'outputNormalized' is set to FALSE
.
The function displays an error and returns NULL
if varp
contains elements not in names(p)
,
or if times
includes a negative value.
It is recommended to use symbolic derivation (symbolic==TRUE
) rather than numerical derivation,
as it is more accurate, especially for derivatives that are formally zero.
See calcVariations
for details.
Other calculation functions:
calcAliasingScoresFromMatrix()
,
calcAliasingScoresFromModel()
,
calcFimFromMatrix()
,
calcFimFromModel()
,
calcSensitivityFromMatrix()
,
calcSensitivityFromModel()
,
calcVariationsFim()
,
calcVariations()
,
fimIdent()