[R] How to extract the within group correlation structure matrix in "lme"

From: liqiu jiang <liqiurhelp_at_yahoo.com>
Date: Wed 29 Jun 2005 - 06:31:08 EST


Dear R users,
 I fitted a repeated measure model without random effects by using lme. I will use the estimates from that model as an initial estimates to do multiple imputation for missing values of the response variable in the model. I am trying to extract the within group correlation matrix or covariance matrix.  

here is my code:
f = lme(y ~x0+x1+trt+tim+x1:tim +tim:trt,random=~-1|subj, data=dat,corr =corAR1())
> f$sigma

[1] 2.330854

b=summary(f)$modelStruct$corStruct
> b

Correlation structure of class corAR1 representing

      Phi
0.8518711

I think 0.8518711 and f$sigma is what I need to reconstruct the variance-cavariance matrix. So, How can I extract 0.8518711 so that I can assign it to a variable? Also, I don't understand what the following parameters estimates mean?  

 >summary(f)$modelStruct
reStruct parameters:

     subj
-20.15833
corStruct parameters:
[1] 2.525869  

I appreciate your time on this.  

Best wishes,
Liqiu                             


 Rekindle the Rivalries. Sign up for Fantasy Football

        [[alternative HTML version deleted]]



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 Wed Jun 29 06:37:55 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:33:06 EST