Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to suppress correlation table in LME?

In the standard example of the lme() function in the nlme package of R:

fm2 <- lme(distance ~ age + Sex, data = Orthodont, random = ~ 1)
summary(fm2)

there appears a correlation table:

Correlation: 
          (Intr) age   
age       -0.813       
SexFemale -0.372  0.000

which can be huge if there are many factor combinations involved.

Is there any way to suppress the output in the summary command? I know that I can use

   print(fm2, cor=F) 

but this does not show me the rest of the usual output for example no p-value calculation.

like image 810
Jens Avatar asked May 13 '13 09:05

Jens


2 Answers

Looking at nlme:::print.summary.lme I don't see a way to suppress the correlation matrix printing (although you could create a hacked version of that function removing the if clause beginning if (nrow(x$tTable)>1) ...)

Perhaps it would be useful to you to be able to print just the summary of the fixed-effect parameters ... ?

 printCoefmat(summary(fm2)$tTable)
like image 180
Ben Bolker Avatar answered Sep 21 '22 12:09

Ben Bolker


Or, more concisely, summary(fm2)$tTable

like image 25
bokov Avatar answered Sep 22 '22 12:09

bokov