residuals.arbor
Residuals from an Arbor Object

Description

Returns a vector of residuals from an arbor object.

Usage

residuals.arbor(object, type = c("usual", "pearson", "deviance"))

Arguments

object a fitted model object of class arbor. This model is assumed to be the result of a function that produces an object with the same named components as that returned by the arbor function.
type indicates a method of residual for a classification tree. (No distinction is made for methods "anova", "poisson", or "exp".) Can be one of the following types of residuals.
  • "usual": misclassification errors.
  • "pearson": the sum of the observed minus fitted squared over fitted.
  • "deviance": minus twice logarithm of fitted.
Value
returns a vector of residuals of type type from a fitted arbor object.
Examples
library("arbor")
data(solder, package = "Sdatasets")
fit <- arbor(skips ~ Opening + Solder + Mask + PadType + Panel, 
       data = solder, method = 'anova') 
pr <- data.frame(predict(fit), residuals(fit))
pr[880:900,]

Package arbor version 6.1.4-13
Package Index