residuals.polr {regr0}R Documentation

Residuals of a Binary or Ordered Regression

Description

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.

Usage

## S3 method for class 'polr'
residuals(object, ...)

Arguments

object

the result of polr or of glm(,family=binomial) with binary data.

...

unused

Details

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].

Value

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

Author(s)

Werner A. Stahel, ETH Zurich

References

See http://stat.ethz.ch/~stahel/regression

See Also

condquant, plot.regr

Examples

require(MASS)
house.plr <- polr(Sat ~ Infl + Type + Cont, weights = Freq, data = housing)
house.resid <- residuals(house.plr)
head   (house.resid)
summary(house.resid)

[Package regr0 version 1.0-5 Index]