# NOT RUN {
## 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))
# }
Run the code above in your browser using DataLab