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 deviance for class "tree". It can be invoked by calling deviance for an object of the appropriate class, or directly by calling deviance.tree regardless of the class of the object.

SEE ALSO:
deviance , tree , tree.object .

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