After running a statistical model in R (e.g., glm
, lm
, lme4::lmer
, etc.), I run the summary()
command with corr=TRUE
to get the Correlation of Coefficients table. It features a matrix of correlations for the intercept and the independent variables in the given model. What I would like to do is extract the columns that make those correlations possible. For instance, if the model is x ~ a + b
, and the table looks like this...
(Intercept) a a 0.## b 0.## 0.##
I want to extract the columns that allow for the correlation between a
and b
.
I have found various commands to extract fitted values and residuals, but nothing to yet that would give me values for a
and b
that correspond to their correlations in that table.