residuals.gamViz: Generalized Additive Model residuals

View source: R/residuals_gamViz.R

residuals.gamVizR Documentation

Generalized Additive Model residuals

Description

Extension of mgcv::residuals.gam. Returns residuals for a fitted GAM model object. Pearson, deviance, working and response residuals are available as in the method from mgcv, but this version also provides residual types "tunif" and "tnormal". The former are obtained using the cdf of the response distribution (if available). The latter are obtained by further transforming the uniform residuals using the quantile function (i.e. the inverse cdf) of a standard normal variable.

Usage

## S3 method for class 'gamViz'
residuals(object, type = "deviance", ...)

Arguments

object

an object of class gamViz, the output of a getViz() call.

type

the type of residuals wanted. If should be one of "deviance", "pearson", "scaled.pearson", "working", "response", "tunif" or "tnormal". Not all are available for each family.

...

further arguments passed to mgcv::residuals.gam.

See Also

See also mgcv::residuals.gam for details.


mgcViz documentation built on Oct. 6, 2023, 5:09 p.m.