simulate(object, nsim, seed, ...)
set.seed
before simulating the response vectors. The value is saved as an
attribute named "seed"
in the returned value. Defaults to a
random integer between 0
ansim
columns and nobs
, the number
of observations in the fitted model object
, rows.(fm2 <- lmer(Reaction ~ Days + (1|Subject) + (0 + Days|Subject), sleepstudy))
sim2 <- simulate(fm2, nsim = 4)
head(sim2)
tail(sim2)
Run the code above in your browser using DataLab