Computes one of the six types of residuals available for regression-scale models.
1 2 3 4
an object inheriting from class
character string; defines the type of residuals, with choices
character string; defines the weight matrix that should be used in
the calculation of the residuals and diagnostics. Possible
absorbs any additional argument.
This is a method for the function
residuals() for objects
inheriting from class
rsm. As several types of residuals are
rsm objects, there is an additional optional
"deletion" residuals are
derived from the final IRLS fit. The
are standardized residuals on the scale of the response, the
"prob" residuals are on the Unif(0,1) scale,
whereas the remaining ones follow approximately the standard normal
The default weighting scheme used is
"observed". The weights
used are the values stored in the
q2 component of the
rsm object. Some of the IRLS weights
rsm may be negative if the error distribution
is Student's t or user-defined. In order to avoid missing values
in the residuals, the default weighting scheme used is then
"score" unless otherwise specified. The
weights are also used by default if Huber's least favourable error
distribution is used.
More details, in particular of the use of these residuals, are given in Brazzale (2000, Section 6.3.1).
A numeric vector of residuals. See Davison and Snell (1991) for detailed definitions of each type of residual.
summary method for
rsm objects produces
response residuals. The
residuals component of a
object contains the response residuals.
Brazzale, A. R. (2000) Practical Small-Sample Parametric Inference. Ph.D. Thesis N. 2230, Department of Mathematics, Swiss Federal Institute of Technology Lausanne.
Davison, A. C. and Snell, E. J. (1991) Residuals and diagnostics. In Statistical Theory and Modelling: In Honour of Sir David Cox (eds. D.V. Hinkley, N. Reid, and E.J. Snell), 83–106. London: Chapman \& Hall.
Davison, A. C. and Tsai, C.-L. (1992) Regression model diagnostics. Int. Stat. Rev., 60, 337–353.
Jorgensen, B. (1984). The delta algorithm and GLIM. Int. Stat. Rev., 52, 283–300.
1 2 3 4 5 6 7 8 9 10 11 12 13 14
## Sea Level Data data(venice) attach(venice) Year <- 1:51/51 c11 <- cos(2*pi*1:51/11) ; s11 <- sin(2*pi*1:51/11) c19 <- cos(2*pi*1:51/18.62) ; s19 <- sin(2*pi*1:51/18.62) venice.rsm <- rsm(sea ~ Year + I(Year^2) + c11 + s11 + c19 + s19, family = extreme) ## residuals(venice.rsm) ## deviance residuals with observed weights residuals(venice.rsm, type = "r.star", weighting = "score") ## r* residuals with score weights detach()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.