Learn R Programming

dMod (version 0.1)

Y: Observation functions.

Description

Creates a function y(out, pars) that evaluates an observation function and its derivatives based on the output of a model function x(times, pars), see Xf and Xs.

Usage

Y(g, f, compile = FALSE)

Arguments

g
Named character vector defining the observation function
f
Named character, the underlying ODE
compile
Logical, compile the function (see funC0)

Value

  • a function y(out, pars, attach=FALSE) representing the evaluation of the observation function. If out has the attribute "sensitivities", the result of y(out, pars), will have an attributed "deriv" which reflec the sensitivities of the observation with respect to the parameters. If pars is the result of a parameter transformation p(pars) (see P), the Jacobian of the parameter transformation and the sensitivities of the observation function are multiplied according to the chain rule for differentiation. If attach = TRUE, the original argument out will be attached to the evaluated observations.