Mean-Variance Plot for a Tree Object

DESCRIPTION:
Creates a plot on the current graphics device of the deviance of the node divided by the number of observations at the node. Also returns the node number.

USAGE:
meanvar.tree(tree, xlab="ave(y)", ylab="ave(deviance)", ...)

REQUIRED ARGUMENTS:
tree:
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:
xlab:
x-axis label for the plot.
ylab:
y-axis label for the plot.
...:
additional graphical parameters may be supplied as arguments to this function.

VALUE:
an invisible list containing the following vectors is returned:
x:
fitted value at terminal nodes (yval).
y:
deviance of node divided by number of observations at node.
label:
node number.

SIDE EFFECTS:
a plot is put on the current graphics device.

SEE ALSO:
plot.tree .

EXAMPLES:
z.auto <- tree(Mileage ~ Weight, car.test.frame)
meanvar.tree(z.auto, log="xy")