[R] How to sample from a linear mixed model

Søren Højsgaard Soren.Hojsgaard at agrsci.dk
Mon Jun 20 00:26:00 CEST 2005


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?




More information about the R-help mailing list