Advances the amounts of a one, two or three compartment linear model by
dt and returns the central concentration, optionally with its
derivatives. This is the per-row kernel behind rxode2's linCmt().
Usage
linCmtModelDouble(
dt,
p1,
v1,
p2,
p3,
p4,
p5,
ka,
alastNV,
rateNV,
ncmt,
oral0,
trans,
deriv,
type,
tau,
tinf,
amt,
bolusCmt,
ndiff,
sensType = 3L,
sensH = 0.001
)Arguments
- dt
time step
- p1, v1, p2, p3, p4, p5
parameters in the
transparameterization (seelinCmtMicros())- ka
absorption rate constant (used when
oral0is 1)- alastNV
amounts at the start of the step (depot first when
oral0is 1, then central and peripherals); withderiv = TRUEfollowed by their parameter sensitivities- rateNV
zero-order rates into each compartment, in the same order
- ncmt
number of compartments, 1 to 3
- oral0
1 when the model has a depot compartment, otherwise 0
- trans
parameterization number
- deriv
logical; also return the derivatives
- type
0 for a regular step; 1 and 2 steady-state infusion, 3 steady-state bolus
- tau
steady-state dosing interval
- tinf
steady-state infusion duration
- amt
steady-state bolus amount
- bolusCmt
steady-state bolus compartment
- ndiff
differentiation bit mask as used by rxode2 (
ka1,p12,v14,p28,p316,p432,p564)- sensType
derivative method: 3 or 30 forward-mode automatic differentiation, 32 all directions in one forward-mode pass, 31 reverse mode, 100 automatic choice, 1 and 2 forward and central differences with the kernel's own step, 10 and 20 forward and central differences with step
sensH- sensH
finite-difference step for
sensType10 and 20