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 ------------------------------
Try print(summary(lm2, corr=TRUE), symbolic.corr=FALSE). It *is* in the help page. HTH, Andy> From: Ted.Harding at nessie.mcc.ac.uk > Subject: [R] Printing correlation matrices (lm/glm) > > 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.------------------------------------------------------------------------------
Seemingly Similar Threads
- Comparing two regression slopes
- as.formula and lme ( Fixed effects: Error in as.vector(x, "list") : cannot coerce to vector)
- Overfitting/Calibration plots (Statistics question)
- as.formula and lme ( Fixed effects: Error in as.vector(x, "list") : cannot coerce to vector)
- Help needed in interpreting linear models