Returns residuals for a fitted
object. Pearson, deviance, working and response residuals are
## S3 method for class 'gam' residuals(object, type = "deviance",...)
the type of residuals wanted. Usually one of
Response residuals are the raw residuals (data minus fitted
values). Scaled Pearson residuals are raw residuals divided by the standard
deviation of the data according to the model mean variance
relationship and estimated scale parameter. Pearson residuals are the same, but multiplied by the square root
of the scale parameter (so they are independent of the scale parameter):
y is data
is model fitted value and
V is model mean-variance relationship.). Both are provided since not all texts
agree on the definition of Pearson residuals. Deviance residuals simply
return the deviance residuals defined by the model family. Working
residuals are the residuals returned from model fitting at convergence.
Families can supply their own residual function, which is used in place of the standard
function if present, (e.g.
A vector of residuals.
Simon N. Wood email@example.com
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.