Background
rxSensMatExp() already supports calcSens2/calcSens3 (R/indLin.R:400-511),
using .rxIndLinChainD() (:165) for repeated total derivatives and
.rxIndLinNdAccumulator() (:181) to sum coefficients when several
differentiation paths land on the same (from, to) pair -- which happens
whenever parameters coincide (p == q, p == q == r).
The forcing terms added at first order need the same treatment at second and
third order.
Test
Extend tests/testthat/test-mexp-nonmem.R:593 (calcSens2/calcSens3 against the
generic ODE path) and :639 (repeated parameters / Hessian diagonal), including
the finite-difference cross-check used for third order, since there is no
generic-ODE calcSens3 reference to compare against.
Blocked by #1187.
Background
rxSensMatExp()already supportscalcSens2/calcSens3(R/indLin.R:400-511),using
.rxIndLinChainD()(:165) for repeated total derivatives and.rxIndLinNdAccumulator()(:181) to sum coefficients when severaldifferentiation paths land on the same
(from, to)pair -- which happenswhenever parameters coincide (
p == q,p == q == r).The forcing terms added at first order need the same treatment at second and
third order.
Test
Extend
tests/testthat/test-mexp-nonmem.R:593(calcSens2/calcSens3 against thegeneric ODE path) and
:639(repeated parameters / Hessian diagonal), includingthe finite-difference cross-check used for third order, since there is no
generic-ODE
calcSens3reference to compare against.Blocked by #1187.