[R] setting the random-effects covariance matrix in lme

From: Rendas-Baum, Regina <Regina_Rendas-Baum_at_brown.edu>
Date: Fri 02 Jun 2006 - 03:27:01 EST

Dear R-users,  

I have longitudinal data and would like to fit a model where both the variance-covariance matrix of the random effects and the residual variance are conditional on a (binary) grouping variable. I guess the model would have the following form (in hierarchical notation) Yi|bi,k ~ N(XiB+Zibi, sigmak*Ident)
bi|k ~ N(0, Dk)

I can obtain different sigmas (sigma0 and sigma1 based on the factor 'dx') using the weights option in the call to lme: lme(fixed = height ~ -1 + bage + mat_ht + pat_ht + dx + time:dx + time2:dx ,


                  random = ~ time + time2 |subject, data = pilot, na.action=na.omit)

 but I cannot seem to be able to get two different matrices for the random effects.

I'm particularly interested in obtaining,  

Y|k ~ N(XB, Z(Dk)Z+sigmak),  

so I need to extract D0 and D1 form the lme object. I've looked in Pinheiro and Bates but was unable to identify how to fit this type of covariance matrix from the examples provided in the book - perhaps it is there expressed in a different form? I looked in section 4.2.2 (pdMat) of teh book but I'm still not sure how to pass it on in the call.  

Any help would be greatly appreciated,  


Regina Rendas-Baum
Graduate Student
Brown University

R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Fri Jun 02 03:46:00 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Mon 05 Jun 2006 - 08:10:41 EST.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.