Interface to combine an ODE and its sensitivity equations
into one model function x(times, pars, deriv = TRUE)
returning ODE output and sensitivities.
Xs(odemodel, forcings = NULL, events = NULL, names = NULL,
condition = NULL, optionsOde = list(method = "lsoda"),
optionsSens = list(method = "lsodes"))
object of class odemodel
data.frame with columns name (factor), time (numeric) and value (numeric). The ODE forcings.
data.frame of events with columns "var" (character, the name of the state to be
affected), "time" (numeric, time point), "value" (numeric, value), "method" (character, either
"replace", "add" or "multiply"). See events.
ATTENTION: Sensitivities for event states will only be correctly computed if defined within
odemodel()
. Specify events within Xs()
only for forward simulation.
character vector with the states to be returned. If NULL, all states are returned.
either NULL (generic prediction for any condition) or a character, denoting the condition for which the function makes a prediction.
list with arguments to be passed to odeC() for the ODE integration.
list with arguments to be passed to odeC() for integration of the extended system
Object of class prdfn. If the function is called with parameters that result from a parameter transformation (see P), the Jacobian of the parameter transformation and the sensitivities of the ODE are multiplied according to the chain rule for differentiation. The result is saved in the attributed "deriv", i.e. in this case the attibutes "deriv" and "sensitivities" do not coincide.