Covers continuous ODE, modeled bioavailability (F), modeled lag (alag),
replace/multiply events, and modeled-rate/duration infusions. A single
forward solve emits the Jacobian, forcing and dose-dual quantities on a fine
grid; the backward costate + quadrature sweep, event jumps and gradient
accumulation run in C++ (rxode2AdjointSweep). Numerically equivalent to
.rxAdjointGradEval().
Usage
.rxAdjointGradEvalC(
build,
params,
obsTimes,
obs,
weight = 1,
denseBy = 0.01,
atol = 1e-10,
rtol = 1e-10
)Arguments
- build
object returned by
.rxAdjointGradBuild().- params
named numeric vector of parameter values.
- obsTimes
numeric observation times.
- obs
numeric observed values aligned with
obsTimes.- weight
numeric scalar or vector of least-squares observation weights (ignored when
errModelis supplied).- denseBy
grid spacing for the forward checkpoint trajectory; smaller values reduce the covariate-interpolation error.
- atol, rtol
solver tolerances used for both the forward checkpoint and the backward sweeps.
