Learn R Programming

VGAM (version 0.8-2)

propodds: Proportional Odds Model for Ordinal Regression

Description

Fits the proportional odds model to a (preferably ordered) factor response.

Usage

propodds(reverse=TRUE)

Arguments

reverse
Logical. Fed into the reverse argument of cumulative.

Value

  • An object of class "vglmff" (see vglmff-class). The object is used by modelling functions such as vglm, and vgam.

Warning

No check is made to verify that the response is ordinal; see ordered.

Details

The proportional odds model is a special case from the class of cumulative link models. It involves a logit link applied to cumulative probabilities and a strong parallelism assumption. A parallelism assumption means there is less chance of numerical problems because the fitted probabilities will remain between 0 and 1; however the parallelism assumption ought to be checked, e.g., via a likelihood ratio test. This VGAM family function is merely a shortcut for cumulative(reverse=reverse, link="logit", parallel = TRUE). Please see cumulative for more details on this model.

References

Agresti, A. (2002) Categorical Data Analysis, 2nd ed. New York: Wiley.

Agresti, A. (2010) Analysis of Ordinal Categorical Data, 2nd ed. New York: Wiley.

Yee, T. W. (2010) The VGAM package for categorical data analysis. Journal of Statistical Software, 32, 1--34. http://www.jstatsoft.org/v32/i10/.

Yee, T. W. and Wild, C. J. (1996) Vector generalized additive models. Journal of the Royal Statistical Society, Series B, Methodological, 58, 481--493.

Documentation accompanying the VGAM package at http://www.stat.auckland.ac.nz/~yee contains further information and examples.

See Also

cumulative.

Examples

Run this code
# Fit the proportional odds model, p.179, in McCullagh and Nelder (1989)
pneumo = transform(pneumo, let = log(exposure.time))
(fit = vglm(cbind(normal, mild, severe) ~ let, propodds, pneumo))
fit@y   # Sample proportions
weights(fit, type = "prior")   # Number of observations
coef(fit, matrix = TRUE)
constraints(fit)   # Constraint matrices
summary(fit)

# Check that the model is linear in let ----------------------
fit2 = vgam(cbind(normal, mild, severe) ~ s(let, df = 2), propodds, pneumo)
plot(fit2, se = TRUE, lcol = 2, scol = 2)

# Check the proportional odds assumption with a LRT ----------
(fit3 = vglm(cbind(normal, mild, severe) ~ let,
             cumulative(parallel = FALSE, reverse = TRUE), pneumo))
pchisq(2*(logLik(fit3)-logLik(fit)),
       df = length(coef(fit3))-length(coef(fit)), lower.tail = FALSE)

Run the code above in your browser using DataLab