原文:https://www.statology.org/glm-fit-fitted-probabilities-numerically-0-or-1-occurred/
在建立逻辑回归模型时遇到这个警告...:
Warning message:
glm.fit: fitted probabilities numerically 0 or 1 occurred
当拟合逻辑回归模型,且数据框中一个或多个观测值的预测概率与...x2 = c(8, 7, 7, 6, 5, 6, 5, 2, 2, 3, 4, 3, 7, 4, 4))
#fit logistic regression model
model <- glm...(y ~ x1 + x2, data=df, family=binomial)
#view model summary
summary(model)
Warning message:
glm.fit...: fitted probabilities numerically 0 or 1 occurred
Call:
glm(formula = y ~ x1 + x2, family = binomial