Probability residual of ordinal logistic regreession | R Documentation |
Probability residual of ordinal logistic regreession.
ord.resid(y, est)
y |
An ordered factor variable or a numerical vector. |
est |
A matrix with the fitted values of an ordinal logistic regression model. |
The probability residual of an ordinal logistic regression model is calculated (Li and Shepherd, 2012). It is a vector, irrespective of how many categories there are.
A vector with the probability residuals.
Michail Tsagris
R implementation and documentation: Michail Tsagris mtsagris@uoc.gr
Li C., & Shepherd B. E. (2012). A new residual for ordinal outcomes. Biometrika, 99(2): 473–480.
testIndOrdinal, ordinal.reg
library(MASS) y <- factor( rbinom(400, 3, 0.6), ordered = TRUE ) x <- rnorm(400) mod <- MASS::polr(y ~ x) res <- ord.resid(y, mod$fitted.values)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.