'Warnings in R glm.fit: fitted probabilities numerically 0 or 1 occurred
I run logistic models in 4 strata because of effect modification. In one of these strata, there occured the following warning:
glm.fit: fitted probabilities numerically 0 or 1 occurred.
By using the summary() function, I saw that the model fits the data and the model converged and estimates were calculated. As I wanted to prestent Odds Ratio, I used the function tab_model. It was not possible to calculate both the OR and the CI. (I only used binary variables.)
My code used:
model.1f <- glm(over ~ as.factor(parent_prim_bin) + age,
data = data, family ="binomial")
over means overweight (low/high);
parent_prim_bin means primary education (low/high);
age means age (metric)
Do you have any ideas to solve this problem?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
