Skip to contents

Solves object as rxSolve() would, then appends rx__sens_<state>_BY_<param>__ columns computed via adjoint (backward) sensitivity analysis. Same column names and output structure as rxSolve(object, ..., calcSens=). Prefer .rxAdjointGrad() when only a scalar objective gradient is needed.

Usage

rxSolveAdjoint(
  object,
  params,
  events,
  calcSens,
  adjStates = NULL,
  denseBy = 0.01,
  atol = 1e-08,
  rtol = 1e-06,
  ...
)

Arguments

object

model definition accepted by rxode2().

params

named numeric vector of parameter values.

events

event table / data used to define dosing and sampling times; sampling (evid==0) times become the sensitivity output times.

calcSens

character vector of parameter names to differentiate with respect to.

adjStates

character vector of output states of interest; defaults to all ODE states (full forward-sensitivity parity).

denseBy, atol, rtol

passed to the adjoint checkpoint solve; see .rxAdjointSolveEvalC().

...

additional arguments passed to the primal rxSolve() call.

Value

the standard rxSolve() output (as returnType="data.frame") with rx__sens_<state>_BY_<param>__ columns appended.

Author

Matthew L. Fidler