Error 'prediction from a rank-deficient fit may be misleading' in glm in R

r
glm

#1

I was using the glm package in R and came across the following error. I am unable to resolve this error = ‘prediction from a rank-deficient fit may be misleading’ or understand the meaning. Please help.

model <- glm(y ~ ., train, family = binomial())
pred = predict(model, cv)
Warning message:
In predict.lm(object, newdata, se.fit, scale = 1, type = ifelse(type == :
prediction from a rank-deficient fit may be misleading


#2

refer to this discussion


#3

Check out the above link. The best explanation i have come across. You will see this happen in Logistic regression more often as you start adding variables.