Skip to contents

Proportional-odds ordinal regression by direct maximum likelihood on the cumulative-link parametrisation used by MASS::polr (same cutpoint transform cumsum(c(theta_1, exp(theta_2..q))) and the same glm-based start), so the fitted log-likelihood matches MASS::polr to optimiser tolerance.

Usage

morie_polr(formula, data, weights, method = "logistic")

Arguments

formula, data

Model formula and data (response an ordered factor).

weights

Optional prior weights.

method

"logistic" (default) or "probit".

Value

A morie_polr object (with $deviance, $coefficients, $zeta).

References

Venables, W. N., & Ripley, B. D. (2002). Modern Applied Statistics with S. Springer.

Examples

set.seed(4)
n <- 250; x <- rnorm(n)
yc <- 1 + (runif(n) > plogis(-0.5 - x)) + (runif(n) > plogis(1 - x))
yf <- factor(pmin(yc, 3), levels = 1:3, ordered = TRUE)
fit <- morie_polr(yf ~ x, data = data.frame(yf, x))
fit$zeta
#>                       
#> -0.5717431  2.0922938