Chun (Jimmie) Ye
2009-Jul-12 00:03 UTC
[R] Specifying a more complex covariance matrix in lme or lmer
Hi all, I've searched threads and read up on some ways of doing this but I'm having a hard time to get it to work. Here's my basic problem. I have the following linear mixed model y = Xb+Zu+e where u~N(0,s^2*K) where K is a matrix. I read a thread that basically suggested to decompose Zu into ZPD^(1/2) D^(-1/2)P'u so that (D^(-1/2)P'u)~N(0,s'^2I) but I'm not sure how to specify the new ZPD^(1/2) incidence matrix using the lme and lmer packages. The closest I got was with the lmer package, where I tried using the doFit=FALSE flag and manually setting the 'Zt' matrices but that doesn't seem to work. With the lme package, I'm not sure if it's possible to create a new pdMat class or if I can manually set the Z design matrix. I tried using the model.matrix commands but that only reads the current design. Thanks in advance to whoever can help out. ~Jimmie [[alternative HTML version deleted]]