
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.
meanvar(tree, ...)# S3 method for rpart
meanvar(tree, xlab = "ave(y)", ylab = "ave(deviance)", ...)
an invisible list containing the following vectors is returned.
fitted value at terminal nodes (yval
).
deviance of node divided by number of observations at node.
node number.
fitted model object of class "rpart"
. This is assumed to be the result
of some function that produces an object with the same named
components as that returned by the rpart
function.
x-axis label for the plot.
y-axis label for the plot.
additional graphical parameters may be supplied as arguments to this function.
a plot is put on the current graphics device.
plot.rpart
.
z.auto <- rpart(Mileage ~ Weight, car.test.frame)
meanvar(z.auto, log = 'xy')
Run the code above in your browser using DataLab