tree
.
burl.tree(tree, nodes, screen.arg=<<see below>>, figs=c(1, length(xlevels)), plot = T)
"tree"
.
This is assumed to be the result of a function that produces
an object with the same
components as those returned by the function
tree
.
split.screen
and
tree.screens
for more details.
c(n,m)
where
n
and
m
are integers.
By default, all sub-plots are placed in a row.
nodes
is given, should plotting be done?
plot=FALSE
)
list of class
c("tree.split", "data.frame")
. This list has one component
for predictor variable which corresponds to
the last node selected interactively
or to the one given in the argument
nodes
.
x
.
x
.
nodes
a plot of deviance change is displayed for each
of the predictors in the formula used to fit
tree
.
This function checks that the user is in split-screen mode.
A dendrogram of
tree
is expected to be visible on the
current screen, and a graphics input device (e.g., a mouse) is required.
Clicking the selection button on a node results in the additional screens
being filled with the information described above.
This process may be repeated any number of times.
Warnings result from selecting leaf nodes.
Clicking the exit button will stop the burling process
and return the list described above for the last node selected.
See
.Device
and
split.screen
for specific details on
graphic input and split-screen mode.
The primary purpose of
burl.tree
is its graphical side effect:
for each node selected or specified, a plot of the change in deviance
at each possible split, on each available predictor.
For continuous predictors, a high density plot displays the
change in deviance for each cut point. For factor predictors, a scatterplot displays
the change in deviance against an encoding of the subset split;
the plotting symbol represents the left-hand split.
The strings of letters labeling splits for factor predictors are determined
by a one-to-one correspondence of the letters of the alphabet (contained
in the S-PLUS dataset
letters
) and the factor levels which can be
obtained using the function
levels
. For example,
"bd"
represents the
second and fourth levels of the corresponding predictor of class
"factor"
.
You may need to
attach
the original data frame prior to using this function.
z <- tree(Mileage~Weight + Type, car.test.frame) # open graphics device then execute the following: tree.screens() plot(z) burl.tree(z) z.cu <- tree(cu.summary, na.action = na.exclude) # burl.tree() can be used non-interactively b3 <- burl.tree(z.cu, 3) # compute alternative splits at node 3 # burl.tree provides convenient input to edit.tree # edit according to the 6th split on Country z.edit <- edit.tree(z.cu, b3$Country[6, ])