meanvar.itree: Mean-Variance Plot for an itree Object

Description Usage Arguments Value Side Effects See Also Examples

View source: R/meanvar.itree.R

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. Same as meanvar.rpart, but implements checks so that a warning/error is printed when called on an object where deviance doesn't have the appropriate meaning.

Usage

1
2
3
4
meanvar(tree, ...)

## S3 method for class 'itree'
meanvar(tree, xlab="ave(y)", ylab="ave(deviance)", ...)

Arguments

tree

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

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.itree.

Examples

1
2
3
#the rpart package's example:
z.auto <- itree(Mileage ~ Weight, car.test.frame)
meanvar(z.auto, log='xy')

Example output

itree is based on the code of rpart.
Bug reports should be directed to this package's maintainer, not rparts'.

Warning message:
In meanvar.itree(z.auto, log = "xy") :
  meanvar is impacted by using penalties and is NOT comparable to unpenalized meanvar.

itree documentation built on May 2, 2019, 7:25 a.m.

Related to meanvar.itree in itree...