I believe getVarCov() will give you what you need.
 
Harold 

	-----Original Message----- 
	From: r-help-bounces@stat.math.ethz.ch on behalf of Thomas Lumley 
	Sent: Tue 8/3/2004 8:36 PM 
	To: Jacob Wegelin 
	Cc: r-help@stat.math.ethz.ch 
	Subject: Re: [R] lme fitted correlation of random effects: where is it? 
	
	

	On Tue, 3 Aug 2004, Jacob Wegelin wrote:
	
	>
	> The print method for lme *prints out* the fitted correlation matrix for
	> the random effects. Is there any way to get these values as an object in
	> R?  I have examined the components of the lme object (called "junk" in the
	> example below) and the components of summary(junk) without finding these
	> numbers.
	>
	> (How I did this: I dumped the entire lme object to a text file and then
	> used egrep to search the text file for one of the long strings of digits
	> that are in the printout. The string was not in the file.  It appears that
	> the print method computes the fitted correlation matrix on the fly??
	> Or where does it get it?)
	>
	
	It's remarkably complicated.  If you look at
	  getS3method("print","lme")
	you see that it comes from
	  print(summary(x$modelStruct), sigma=x$sigma)
	You then look at what the class of x$modelstruct is
	  > class(fm1$modelStruct)
	  [1] "lmeStructInt" "lmeStruct"    "modelStruct"
	and look at getS3method("print","lmeStructInt"), which doesn't exist. You
	then try lmeStruct, with no luck, and then
	  getS3method("print","modelStruct")
	
	After a lot more chasing through methods you find that the correlation
	matrix is computed by the generic function pdMatrix.  You probably want to
	look at
	   getS3method("pdMatrix","pdSymm")
	and
	   getS3method("pdMatrix","pdMat")
	
	And all this may well change when Doug finishes lme4.
	
	        -thomas
	
	______________________________________________
	R-help@stat.math.ethz.ch mailing list
	https://www.stat.math.ethz.ch/mailman/listinfo/r-help
	PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
	


	[[alternative HTML version deleted]]


