[R] Printing correlation matrices (lm/glm)

(Ted Harding) Ted.Harding at nessie.mcc.ac.uk
Fri Dec 20 03:39:03 CET 2002


Hi Folks,

I'm analysing some data which, in its simplest aspect,
has 3 factors A, B, C each at 2 levels.

If I do

  lm1 <- lm(y ~ A*B)

say, and then

  summary(lm1, corr=T)

I get the correlation matrix of the estimated coeffcients
with numerical values for the correlations (3 coeffs in this
case). Likewise with 'glm' instead of 'lm'.

However, if I do

  lm2 <- lm(y ~ A*B*C)

and then

  summary(lm2, corr=T)

I get only symbols (such as ".", "+", "*") for the values,
denoting ranges, and not numbers (7 coefficients in this case).

Presumably this happens when the number of columns is considered
to be getting a bit large for numbers -- though 7 is not huge ...

Anyway, is there any way I can get the full correlation matrix
out with numbers instead of symbols, even with several coefficients?

With thanks,
Ted.


--------------------------------------------------------------------
E-Mail: (Ted Harding) <Ted.Harding at nessie.mcc.ac.uk>
Fax-to-email: +44 (0)870 167 1972
Date: 20-Dec-02                                       Time: 02:31:49
------------------------------ XFMail ------------------------------




More information about the R-help mailing list