residuals.polr {regr0} | R Documentation |
Calculates quartiles and random numbers according to the conditional distribution of residuals for the latent variable of a binary or ordinal regression, given the observed response value. See Details for an explanation.
## S3 method for class 'polr' residuals(object, ...)
object |
the result of |
... |
unused |
For binary and ordinal regression, the regression models can be described by introducing a latent response variable Z of which the observed response Y is a classified version, and for which a linear regression applies. The errors of this "latent regression" have a logistic distribution. Given the linearly predicted value eta[i], which is the fitted value for the latent variable, the residual for Z[i] can therefore be assumed to have a logistic distribution.
This function calculates quantiles and random numbers according to the conditional distribution of residuals for Z[i], given the observed y[i].
a data.frame with the variables
median |
medians of the conditional distributions |
lowq |
lower quartiles |
uppq |
upper quartiles |
random |
random numbers, drawn according to the conditional distributions |
fit |
linear predictor values |
y |
observed response values |
Werner A. Stahel, ETH Zurich
See http://stat.ethz.ch/~stahel/regression
require(MASS) house.plr <- polr(Sat ~ Infl + Type + Cont, weights = Freq, data = housing) house.resid <- residuals(house.plr) head (house.resid) summary(house.resid)