| residuals.earth {earth} | R Documentation |
Residuals for an earth model.
## S3 method for class 'earth':
residuals(object = stop("no 'object' arg"),
type = NULL, warn = TRUE, ...)
## S3 method for class 'earth':
resid(object = stop("no 'object' arg"),
type = NULL, warn = TRUE, ...)
object |
An earth object.
This is the only required argument.
|
type |
One of"earth" (default) return earth residuals (from the lm fit on bx)"deviance"
Return the earth lm residuals unless the object has a glm component,
in which case return the glm deviance residuals."pearson""working""response""partial"
Return the corresponding glm residuals
(from the glm fit on bx).
Can only be used if the earth model has a glm component.
|
warn |
This function gives warnings when the results are not what you may expect.
Use warn=FALSE to turn of just these warnings.
|
... |
Unused, but provided for generic/method consistency. |
The residual values (will be a matrix for multiple response models).
earth
residuals
resid identical to residuals
data(etitanic) a <- earth(pclass ~ ., data=etitanic, glm=list(family=binomial)) head(resid(a, warn=FALSE)) # earth residuals, a column for each response head(resid(a, type="earth")) # same head(resid(a, type="deviance")) # GLM deviance residuals, a column for each response