inst/tinytest/test-warnings.R

## endometrial data from Heinze \& Schemper (2002) (see ?endometrial)
data("endometrial", package = "detectseparation")

expect_message(endometrial_separation <- glm(HG ~ I(-NV) + PI + EH, data = endometrial,
                                             family = binomial("log"),
                                             method = "detect_separation"), pattern = "not necessarily")


expect_warning(endometrial_separation <- glm(HG ~ I(-NV) + PI + EH, data = endometrial,
                                             family = binomial("identity"),
                                             method = "detect_separation"), pattern = "reliable")


expect_warning(endometrial_separation <- glm(HG ~ I(-NV) + PI + EH, data = endometrial,
                                             family = poisson("log"),
                                             method = "detect_separation"), pattern = "for use with binomial-response")

Try the detectseparation package in your browser

Any scripts or data that you put into this service are public.

detectseparation documentation built on Aug. 27, 2022, 1:08 a.m.