check_infinite_estimates.glm {brglm2} | R Documentation |

A simple diagnostic of whether the maximum likelihood estimates are infinite

## S3 method for class 'glm' check_infinite_estimates(object, nsteps = 20, ...)

`object` |
the result of a |

`nsteps` |
starting from |

`...` |
currently not used. |

`check_infinite_estimates`

attempts to identify the occurrence
of infinite estimates in GLMs with binomial responses by
successively refitting the model. At each iteration the maximum
number of allowed IWLS iterations is fixed starting from 1 to
`nsteps`

(by setting `control = glm.control(maxit = j)`

,
where `j`

takes values 1, ..., nsteps in
`glm`

). For each value of `maxit`

, the estimated
asymptotic standard errors are divided to the corresponding ones
from `control = glm.control(maxit = 1)`

. Then, based on the
results in Lesaffre & Albert (1989), if the sequence of ratios in
any column of the resultant matrix diverges, then complete or
quasi-complete separation occurs and the maximum likelihood
estimate for the corresponding parameter has value minus or plus
infinity.

`check_infinite_estimates`

will be removed from brglm2
at version 0.8. An new version of `check_infinite_estimates`

is now maintained in the detectseparation R package at
https://cran.r-project.org/package=detectseparation. In order
to use the version in `detect_separation`

load first
brglm2 and then detectseparation, i.e.
`library(brglm2); library(detectseparation)`

.

Kosmidis I, Firth D (2020). Jeffreys-prior penalty, finiteness and shrinkage in binomial-response generalized linear models. *Biometrika* doi: 10.1093/biomet/asaa052

Lesaffre E, Albert A (1989). Partial Separation in Logistic Discrimination. *Journal of the Royal Statistical Society. Series B (Methodological)*, **51**, 109-116 doi: 10.1111/j.2517-6161.1989.tb01752.x

## endometrial data from Heinze \& Schemper (2002) (see ?endometrial) data("endometrial", package = "brglm2") endometrialML <- glm(HG ~ NV + PI + EH, data = endometrial, family = binomial("probit")) ## clearly the maximum likelihood estimate for the coefficient of ## NV is infinite check_infinite_estimates(endometrialML) ## Not run: ## Aligator data (Agresti, 2002, Table~7.1) data("alligator", package = "brglm2") all_ml <- brmultinom(foodchoice ~ size + lake , weights = round(freq/3), data = alligators, type = "ML", ref = 1) ## Clearly some estimated standard errors diverge as the number of ## Fisher scoring iterations increases matplot(check_infinite_estimates(all_ml), type = "l", lty = 1, ylim = c(0.5, 1.5)) ## End(Not run)

[Package *brglm2* version 0.7.1 Index]