nlmeODE {nlmeODE} | R Documentation |
This package combines the odesolve
and nlme
packages for mixed-effects modelling.
nlmeODE(model,data,LogParms,JAC,SEQ,rtol,atol)
model |
A list including the following elements:
|
data |
groupedData object with a formula specifying which columns are the dependent and independent variables,
and grouping factor. Optional columns in the groupedData object are the dose Dose , dosing compartment Cmt ,
rate of infusion Rate , covariate measurements, etc. |
LogParms |
If TRUE, the parameters are reparameterized in terms of the logarithm of the parameters. Default is TRUE. |
JAC |
If TRUE, the Jacobian of the system of ODE's is computed and passed to the ODE solver. In some circumstances, supplying the Jacobian can speed up the computations if the system is stiff. Default is TRUE. |
SEQ |
A logical value, that when TRUE, adds a gradient attribute to the returned value calculated by simultaneous solution of the sensitivity equations associated with the system of ODE's. Default is FALSE. |
rtol |
Relative error tolerance for lsoda. Default is 0.01. |
atol |
Absolute error tolerance for lsoda. Default is 0.01. |
A function compatible with nlme
estimation for systems of ordinary differential equations (ODE's).
The `demo' directory contains an example of using
nlmeODE for simultaneous non-linear mixed-effects modelling
of population PK/PD data (type demo(nlmeODE)
). For examples
of other commonly used models see TheophODE
,
IndomethODE
, and IVInf
.
Christoffer W. Tornoe <christoffer.tornoe@ferring.com>
### Example with multiple IV bolus doses data(MultBolus) onecompIV <- list(DiffEq=list( dy1dt = ~ -ke*y1), ObsEq=list( c1 = ~ y1/Vd), States=c("y1"), Parms=c("ke","Vd"), Init=list(0)) MultBolusModel <- nlmeODE(onecompIV,MultBolus) fit <- nlme(Conc ~ MultBolusModel(ke,Vd,Time,ID), data = MultBolus, fixed=ke+Vd~1, random = pdDiag(ke~1), start=c(ke=log(0.1), Vd=log(1)), control=list(msVerbose=TRUE), verbose=TRUE) plot(augPred(fit,level=0:1))