The warning you have received is not caused simply by correlations between columns (which are not in themselves a problem) but rather by the fact that your model matrix is not of full rank. Basically, your model is over-parametrized.
This is a problem caused by all the columns of your design matrix together. It is not a problem that can be analysed in terms of pairwise correlations alone. When all the columns of the model matrix are considered together, they are in fact perfectly collinear in one particular dimension, otherwise you would not get the message that you quote.
You will get a similar message from summary(fit)
for any linear model or generalized linear model fit whenever there are one or more NA coefficients. Looking at the summary
output will make it explicit which coefficient is NA in your case.
Usually the message is a signal that you should reformulate your model matrix to avoid the over-parametrization.
You might also find alias(fit)
useful.
The output is brief, but it attempts to show you exactly which coefficients are aliased with which others.
People have asked about similar messages many times on this help forum, for example
- Logistic regression "1 not defined because of singularities"
- Coefficients: (5 not defined because of singularities)
- How to deal with an error such as "Coefficients: 14 not defined because of singularities" in R?
If you provided more information about your data and glm
call we might be able to give specific advice about your model matrix should be reformulated.