
glm
function so that a check for the existence of the maximum likelihood estimate is computed before fitting a ‘glm’ with a binary response.
glm(formula, family = gaussian, data, weights, subset, na.action, start = NULL,
etastart, mustart, offset, control = glm.control(...), model = TRUE,
method = "glm.fit", x = FALSE, y = TRUE, contrasts = NULL, ...,
separation = c("find", "test"))
separation = "find"
, the terms separating the sample points are identified when the maximum likelihood estimate is found not to exist.glm
glm
glm
glm
glm
glm
glm
glm
glm
glm
glm
glm
glm
glm
glm
glm
glm
glm
function.
glm
.
## A set of 4 completely separated sample points ##
x <- c(-2, -1, 1, 2)
y <- c(0, 0, 1, 1)
## Not run: glm(y ~ x, family = binomial)
## A set of 4 quasicompletely separated sample points ##
x <- c(-2, 0, 0, 2)
y <- c(0, 0, 1, 1)
## Not run: glm(y ~ x, family = binomial)
Run the code above in your browser using DataLab