residuals.rpart.RdMethod for residuals for an rpart object.
# S3 method for rpart residuals(object, type = c("usual", "pearson", "deviance"), ...)
| object | fitted model object of class |
|---|---|
| type | Indicates the type of residual desired. For regression or For classification trees the For |
| ... | further arguments passed to or from other methods. |
Vector of residuals of type type from a fitted rpart object.
McCullagh P. and Nelder, J. A. (1989) Generalized Linear Models. London: Chapman and Hall.
fit <- rpart(skips ~ Opening + Solder + Mask + PadType + Panel, data = solder.balance, method = "anova") summary(residuals(fit))#> Min. 1st Qu. Median Mean 3rd Qu. Max. #> -13.8000 -1.0361 -0.6833 0.0000 0.9639 16.2000