residuals.rpart
From rpart v3.1-22
by Brian Ripley
Residuals From a Fitted Rpart Object
Method for residuals
for an rpart
object.
- Keywords
- tree
Usage
## S3 method for class 'rpart':
residuals(object, type = c("usual", "pearson", "deviance"), ...)
Arguments
- object
- fitted model object of class
"rpart"
. - type
- Indicates the type of residual desired.
For regression or
anova
trees all three residual definitions reduce toy - fitted
. This is the residual returned foruser
method trees as well.For classification tr
- ...
- further arguments passed to or from other methods.
Value
- vector of residuals of type
type
from a fittedrpart
object.
References
McCullagh P. and Nelder, J. A. (1989) Generalized Linear Models. London: Chapman and Hall.
Examples
fit <- rpart(skips ~ Opening + Solder + Mask + PadType + Panel,
data=solder, method='anova')
summary(residuals(fit))
plot(predict(fit),residuals(fit))
Community examples
Looks like there are no examples yet.