powered by
residuals
rpart
## S3 method for class 'rpart': residuals(object, type = c("usual", "pearson", "deviance"), ...)
"rpart"
For regression or anova trees all three residual definitions reduce to y - fitted. This is the residual returned for user method trees as well.
anova
y - fitted
user
For classification tr
type
data(solder) fit <- rpart(skips ~ Opening + Solder + Mask + PadType + Panel, data=solder, method='anova') summary(residuals(fit)) plot(predict(fit),residuals(fit))
Run the code above in your browser using DataLab