A plot of one Logic Regression tree

Description

Makes a plot of one Logic Regression tree, fitted by logreg.

Usage

## S3 method for class 'logregtree'
plot(x, nms, full=TRUE, and.or.cx=1.0, leaf.sz=1.0,
                leaf.txt.cx=1.0, coef.cx=1.0, indents=rep(0,4), coef=TRUE,
                coef.rd=4, ...)

Arguments

xan object of class logregtree, or the trees component of such an object. Typically this object will be part of the result of an object of class logreg, generated with select = 1 (single model fit) or select = 2 (multiple model fit).
nmsnames of variables. If nms is provided variable names will be plotted, otherwise indices will be used.
fullif TRUE, the tree occupies the entire window with margins specified by indents.
and.or.cxcharacter expansion (size) for the operators and/or.
leaf.szcharacter expansion for the size of the leaves.
leaf.txt.cxcharacter expansion for the text in the leaves.
coef.cxcharacter expansion for the coefficient string.
indentsindents for plot - bottom, left, top, right.
coefif TRUE, the coefficient of the tree is plotted.
coef.rdcontrols how many digits of the above coefficient are displayed.
...

graphical parameters can be given as arguments to plot.

Value

This function makes a plot of one logic tree. The character expansion terms (and.or.cx, leaf.sz, leaf.txt.cx, coef.cx) defaults of 1.0 are chosen to generate a pretty plot of a single tree with up to eight leaves (4 levels deep). To plot more than one tree, or trees of different complexity, scale accordingly.

Author(s)

Ingo Ruczinski and Charles Kooperberg

References

Ruczinski I, Kooperberg C, LeBlanc ML (2003). Logic Regression, Journal of Computational and Graphical Statistics12, 475-511.

Ruczinski I, Kooperberg C, LeBlanc ML (2002). Logic Regression - methods and software. Proceedings of the MSRI workshop on Nonlinear Estimation and Classification (Eds: D. Denison, M. Hansen, C. Holmes, B. Mallick, B. Yu), Springer: New York, 333-344.

Selected chapters from the dissertation of Ingo Ruczinski.

See Also

logregframe.logreglogreg.testdat

Examples

data(logreg.savefit2)
#
# myanneal2 <- logreg.anneal.control(start = -1, end = -4, iter = 25000, update = 0)
# logreg.savefit2 <- logreg(resp = logreg.testdat[,1], bin=logreg.testdat[, 2:21],
#                 type = 2, select = 2, ntrees = c(1,2), nleaves =c(1,7),
#                 anneal.control = myanneal2)
for(i in 1:logreg.savefit2$nmodels) for(j in 1:logreg.savefit2$alltrees[[i]]$ntrees[1]){
    plot.logregtree(logreg.savefit2$alltrees[[i]]$trees[[j]])
    title(main=paste("model",i,"tree",j))
}