Xs: Model prediction function for ODE models.

Description Usage Arguments Value

View source: R/prediction.R

Description

Interface to combine an ODE and its sensitivity equations into one model function x(times, pars, deriv = TRUE) returning ODE output and sensitivities.

Usage

1
2
3
4
5
6
7
8
9
Xs(
  odemodel,
  forcings = NULL,
  events = NULL,
  names = NULL,
  condition = NULL,
  optionsOde = list(method = "lsoda"),
  optionsSens = list(method = "lsodes")
)

Arguments

odemodel

object of class odemodel

forcings

data.frame with columns name (factor), time (numeric) and value (numeric). The ODE forcings.

events

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.

names

character vector with the states to be returned. If NULL, all states are returned.

condition

either NULL (generic prediction for any condition) or a character, denoting the condition for which the function makes a prediction.

optionsOde

list with arguments to be passed to odeC() for the ODE integration.

optionsSens

list with arguments to be passed to odeC() for integration of the extended system

Value

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.


dMod documentation built on Jan. 27, 2021, 1:07 a.m.