Deviance of a Tree Object

DESCRIPTION:

Returns the deviance at each node of a given object or the total tree deviance.

USAGE:

deviance.tree(obj, detail = F) 

REQUIRED ARGUMENTS:

obj
fitted model object of class tree. This is assumed to be the result of some function that produces an object with the same named components as that returned by the tree() function.

OPTIONAL ARGUMENTS:

detail
logical flag: if TRUE, returns the deviance at each node; if FALSE (default), returns the total tree deviance.

VALUE:

The deviance at each node of obj or the total tree deviance.

DETAILS:

This function is a method for the generic function for class tree. It can be invoked by calling for an object x of the appropriate class, or directly by calling regardless of the class of the object.

SEE ALSO:

, , .

EXAMPLES:

z <- tree(Mileage ~ Weight, car.test.frame) 
deviance(z)