Description
Usage
Arguments
Value
References
Examples
View source: R/residuals.rpart.R
Method for residuals
for an rpart
object.
 ## S3 method for class 'rpart'
(object, = ("usual", "pearson", "deviance"), )

object 
fitted model object of class "rpart" .

type 
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
(1fitted)/sqrt(fitted(1fitted)) 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.

... 
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 < (skips ~ Opening + Solder + Mask + PadType + Panel,
= , method = "anova")
((fit))
((fit),(fit))

rpart documentation built on May 29, 2017, 3:33 p.m.
Search within the rpart package
Search all R packages, documentation and source code