
Differentiate and expand a matrix exponential model with forward sensitivities
Source:R/indLin.R
rxSensMatExp.RdThe system is split the way indLin() splits it: a rate matrix that is
constant in the states, expressed as k_from_to micro-constants, plus an
indLin() forcing carrying everything else. Each sensitivity compartment
gets the same rate matrix, the (dA/dp).X cross terms as non-depleting
transfers, and its own forcing d(f)/dp + (df/dy).S^p.
Usage
rxSensMatExp(
model,
calcSens,
calcSens2 = NULL,
calcSens3 = NULL,
doConst = FALSE,
env = NULL
)Arguments
- model
rxode2 model, text, or function
- calcSens
A character vector of parameter names for which sensitivities should be calculated.
- calcSens2
character vector (or
NULL) requesting second-order sensitivitiesrx__sens_<x>_BY_<p>_BY_<q>__(povercalcSens,qovercalcSens2; everycalcSens2element must also be incalcSens). Ignored forlinCmt()states (those use Stan forward-AD).- calcSens3
character vector (or
NULL) requesting third-order sensitivitiesrx__sens_<x>_BY_<p>_BY_<q>_BY_<r>__(rovercalcSens3). RequirescalcSens2; everycalcSens3element must also be incalcSens2.- doConst
Replace constants with values; By default this is
FALSE.- env
A pre-loaded symengine environment (from
.rxLoadPrune()) to reuse instead of reloadingmodel; whenNULLit is built internally.