Fisher scoring for the binomial and Poisson families with their canonical links. Separation is detected from the fitted probabilities rather than from a coefficient threshold: under separation the probabilities are pinned at 0/1 long before any coefficient grows large enough to trip a cut-off.
Usage
morie_esl_iwls(
X,
y,
beta0 = NULL,
family = "binomial",
max_iter = 50L,
tol = 1e-08,
add_intercept = TRUE
)Arguments
- X
Design matrix, n by p, without an intercept column.
- y
Response: 0/1 for binomial, non-negative counts for Poisson.
- beta0
Starting coefficients; defaults to zeros.
- family
"binomial" or "poisson".
- max_iter
Maximum IRLS iterations.
- tol
Convergence tolerance on the coefficient change.
- add_intercept
Prepend a column of ones.
