Predictor variable has the correlation value of -0.98 to the binary response (with classes 1 and 2). However, logistic regression coefficient come out to be insignificant. The residual deviance of the model is also significantly low. What can be the reason behind this? How is it possible to have a model with significant coefficients? The code and output is below.
fit <- glm(blType==1 ~ gammaSupRatio, family = binomial(link = "logit"), data = df)
summary(fit)
Call:
glm(formula = blType == 1 ~ gammaSupRatio, family = binomial(link = "logit"),
data = df)
Deviance Residuals:
Min 1Q Median 3Q Max
-0.15354 -0.15354 0.00002 0.00002 2.98214
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) -4.4348 0.5808 -7.636 2.24e-14 ***
gammaSupRatio 18.0006 2008.1727 0.009 0.993
Signif. codes: 0 '*' 0.001 '' 0.01 '*' 0.05 '.' 0.1 ' ' 1
(Dispersion parameter for binomial family taken to be 1)
Null deviance: 709.712 on 511 degrees of freedom
Residual deviance: 32.644 on 510 degrees of freedom
AIC: 36.644
Number of Fisher Scoring iterations: 21
logistif::flic(), instead of regular logistic regression? It is specifically designed to deal with cases with near perfect separation and is less biased than usual logistic regression. – Noah Feb 21 '23 at 16:54