Indicates the type of residual desired.
For regression or anova
trees all three residual
definitions reduce to y - fitted
. This is the residual returned for
user
method trees as well.
For classification trees the usual
residuals
are the misclassification losses L(actual, predicted) where L is the
loss matrix. With default losses this residual is
0/1 for correct/incorrect classification.
The pearson
residual is
(1-fitted)/sqrt(fitted(1-fitted)) and the deviance
residual is
sqrt(minus twice logarithm of fitted).
For poisson
and exp
(or survival) trees, the usual
residual
is the observed - expected number of events.
The pearson
and deviance
residuals are as defined in
McCullagh and Nelder.