Graph a classification or regression tree with a hierarchical
tree diagram, optionally including colored symbols at leaves
and additional info at intermediate nodes.
if size=0, draw terminal symbol at leaves else a
symbol of size in cex units.
col
vector of colors from hsv, rgb,
etc, or if NULL, then use rainbow.
nodeinfo
if TRUE, add a line at each node with mean value
of response, number of observations, and percent
deviance explained (or classified correct).
units
label for units of mean value of response, if
regression tree.
cases
label for type of observations.
digits
number of digits to round mean value of response, if
regression tree.
print.levels
if TRUE, print levels of factors at splits,
otherwise only the factor name.
new
if TRUE, call plot.new.
Details
As in plot.rpart(,uniform=TRUE), each level has constant depth.
Specifying nodeinfo=TRUE, shows the deviance explained or the
classification rate at each node.
A split is shown, for numerical variables, as
variable <> value when the cases with lower values go left, or as
variable >< value when the cases with lower values go right.
When the splitting variable is a factor, and print.levels=TRUE,
the split is shown as levels = factor = levels with the cases
on the left having factor levels equal to those on the left of the
factor name, and correspondingly for the right.