[R] How to sample from a linear mixed model

Søren Højsgaard
Sun, 19 Jun 2005 22:26:00 -0000

I would like to draw a sample from a linear mixed model y=Xb+Zu+e which has been
fitted with lme(), i.e. a model y ~ N(Xb, C), where C=Z cov(u) Z' + cov(e).
I've tried to figure out how to extract C from an lme object, because that
would solve my problem when also using the predict() function, but without any
luck.
Can anyone help on that?