Learn R Programming

unitquantreg (version 0.0.6)

residuals.unitquantreg: Residuals method for unitquantreg objects

Description

Extract various types of residuals from unit quantile regression models.

Usage

# S3 method for unitquantreg
residuals(object, type = c("quantile", "cox-snell", "working", "partial"), ...)

Value

Numeric vector of residuals extract from an object of class unitquantreg.

Arguments

object

fitted model object of class unitquantreg.

type

character indicating type of residuals. The options are "quantile", "cox-snell", "working" and "partial".

...

currently not used.

Author

André F. B. Menezes

Details

The residuals method can compute quantile and Cox-Snell residuals. These residuals are defined, respectively, by

$$r_{Q} = \Phi^{-1}\left[ F(y_i \mid \widehat{\mu}_i, \widehat{\theta}_i)\right]$$

and

$$r_{CS} = -\log\left[1- F(y_i \mid \widehat{\mu}_i, \widehat{\theta}_i)\right]$$ where \(\widehat{\mu}_i\) and \(\widehat{\theta}_i\) are the fitted values of parameters \(\mu\) and \(\theta\), \(F(\cdot \mid \cdot, \cdot)\) is the cumulative distribution function (c.d.f.) and \(\Phi(\cdot)\) is the c.d.f. of standard Normal distribution.

Apart from the variability due the estimates of parameters,if the fitted regression model is correctly specified then the quantile residuals, \(r_Q\), follow a standard Normal distribution and the Cox-Snell residuals, \(r_{CS}\), follow a standard exponential distribution.

References

Cox, D. R. and Snell E. J., (1968). A general definition of residuals. Journal of the Royal Statistical Society - Series B, 30(2), 248--265.

Dunn, P. K. and Smyth, G. K., (1996). Randomized quantile residuals. Journal of Computational and Graphical Statistics, 5(3), 236--244.