Arguments

character string; defines the type of residuals, with choices
"deviance", "pearson", "response",
"r.star", "prob" or "deletion"; the first
is the default.

weighting

character string; defines the weight matrix that should be used in
the calculation of the residuals and diagnostics. Possible
choices are "observed", "score", "deviance"
and "max"; see Jorgensen (1984) for their
definition. The default is "observed".

...

absorbs any additional argument.

Details

This is a method for the function residuals() for objects
inheriting from class rsm. As several types of residuals are
available for rsm objects, there is an additional optional
argument type. The "deviance", "pearson",
"r.star", "prob" and "deletion" residuals are
derived from the final IRLS fit. The "response" residuals
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
distribution.

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
returned by 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 "score"
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).

Value

A numeric vector of residuals. See Davison and Snell (1991)
for detailed definitions of each type of residual.

Note

The summary method for rsm objects produces
response residuals. The residuals component of a rsm
object contains the response residuals.