Learn R Programming

nlme (version 3.1-31)

simulate.lme: simulate lme models

Description

The model m1 is fit to the data. Using the fitted values of the parameters, nsim new data vectors from this model are simulated. Both m1 and m2 are fit by maximum likelihood (ML) and/or by restricted maximum likelihood (REML) to each of the simulated data vectors.

Usage

simulate.lme(m1, m2, Random.seed, method, nsim, niterEM, useGen)

Arguments

Value

an object of class simulate.lme with components null and alt. Each of these has components ML and/or REML which are matrices. An attribute called Random.seed contains the seed that was used for the random number generator.

See Also

lme

Examples

Run this code
data(Orthodont)
orthSim <-
 simulate.lme(m1 = list(fixed = distance ~ age, data = Orthodont,
                        random = ~ 1 | Subject),
              m2 = list(random = ~ age | Subject))

Run the code above in your browser using DataLab