nlmeODE {nlmeODE}R Documentation

Non-linear mixed-effects modelling in nlme using differential equations

Description

This package combines the odesolve and nlme packages for mixed-effects modelling.

Usage

nlmeODE(model,data,LogParms,JAC,SEQ,rtol,atol)

Arguments

model A list including the following elements:
DiffEq
A list of formulas containing the ODE's for the system in the same order as the compartment numbers, i.e. formula i is the ODE for compartment i.
ObsEq
A formula specifying which state is observed along with possible scaling parameters.
Parms
A vector with the names of the parameters used in DiffEq followed by the parameters in ObsEq and the initial state parameters.
States
A vector with the names of the states in DiffEq.
Init
A logical vector with the same length as States specifying whether initial state estimates should be obtained for the particular state when TRUE.
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.

Value

A function compatible with nlme estimation for systems of ordinary differential equations (ODE's).

Note

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.

Author(s)

Christoffer W. Tornoe <christoffer.tornoe@ferring.com>

See Also

nlme, lsoda

Examples

### 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))

[Package Contents]