fitted probabilities error numerically 0 or 1 [closed]
Asked Answered
K

1

0

I tried to construct a generalized linear model in R.

I receive the following output below with the error "fitted probabilities numerically 0 or 1 occurred". I am wondering is this due to complete separation? My intercepts and standard errors are not very large and I am wondering is this error due to something else?

best <- glm(y ~ p1 + p2 + p3, family = binomial)
glm.best: fitted probabilities numerically 0 or 1 occurred

enter image description here

Karyoplasm answered 28/2, 2021 at 17:41 Comment(3)
Are you sure it is an error?Kirksey
@smci- Could you reopen the question and comment on if you think it is a problem of complete separation or if it is actually OK?Karyoplasm
This does not look like a complete separation problem. Estimates are not especially large in magnitude (max(abs(beta)) is less than 2; values of e.g. 8 or higher start to indicate problems) and the standard errors are also reasonable.Borroff
A
1

Mostly the error occurs when there is a matter with separation. To overcome this issue you can use Firth's method. In R Firth's method is implemented in the logistf package: https://cran.r-project.org/web/packages/logistf/logistf.pdf#Rfn.logistf

Audreaaudres answered 28/2, 2021 at 18:0 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.