[R-sig-ME] working around glm.fit: "fitted probabilities numerically 0 or 1 occurred"
Jack Tanner
ihok at hotmail.com
Thu Aug 23 17:31:43 CEST 2012
I'm using lme4 0.999999-0 to fit some 0/1 response data with a logistic
regression and I get glm.fit: "fitted probabilities numerically 0 or 1
occurred". I've read Ted Harding's explanation
<http://r.789695.n4.nabble.com/glm-fit-quot-fitted-probabilities-numerically-0-or-1-occurred-quot-td849242.html>,
but I still don't know how to work around this.
More specifically, this is a Rasch-style model. When I fit a smaller
model that has only effects (intercepts), not covariates, glmer()
converges fine. When I add a matrix of covariates, which are mainly
low-frequency counts (lots of zeros), I get "fitted probabilities
numerically 0 or 1 occurred". I can fit the model including covariates
under JAGS, but I was hoping to be able to fit it under lmer because
MCMC can be very slow.
Perhaps there are some ways I could reparametrize the model?
Another idea is that calling glmer(..., verbose=TRUE) gives the error on
the very first iteration, i.e.,
0: nan: 0.180462 0.0723839 ...
Warning messages:
1: glm.fit: fitted probabilities numerically 0 or 1 occurred
2: In mer_finalize(ans) : gr cannot be computed at initial par (65)
Would it be worth trying to specify good starting values? If so, is
there a way to extract estimates from an object of class mer that can be
easily passed to glmer(..., start=...)?
More information about the R-sig-mixed-models
mailing list