While I was working on a project, I stuck into an error saying
glm.fit: fitted probabilities numerically 0 or 1 occurred
when I tried glm()
with full model. Before including quadratic and interaction terms into the model, it worked fine. How can I resolve this?
My data temp
has 11 variables and 1 response variable (12 columns) with 201 rows (observations).
The below is my code:
test2 <- glm(Y ~ (Age_Q16 + COPD + HighSch + Widodiv + Married + DISABLED + CEREBROVASCULAR_DISEASE + VALVE_DISEASE + NITRATES + Q9 + Q14Down)^2
+ Age_Q16sq + Q9sq + Q14Downsq,temp,family=binomial("logit"),maxit=100)
summary(test2)