eval.logreg {LogicReg} | R Documentation |
Evaluate a Logic Regression tree
Description
This function evaluates a logic tree, typically a part
of an object generated by logreg
.
Usage
eval.logreg(ltree, data)
Arguments
ltree |
an object of class |
data |
a data frame on which the logic tree is to be
evaluated. |
Value
A binary vector with length equal to the number of rows of
data
; a 1 corresponds to cases for which ltree
was
TRUE
and a 0 corresponds to cases for which ltree
was
FALSE
if ltree
was an object of class logregtree
or the trees
component of such an object. Otherwise a matrix
with one column for each tree in ltree
.
Author(s)
Ingo Ruczinski ingo@jhu.edu and Charles Kooperberg clk@fredhutch.org
References
Ruczinski I, Kooperberg C, LeBlanc ML (2003). Logic Regression, Journal of Computational and Graphical Statistics, 12, 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.
See Also
logreg
,
logregtree
,
logregmodel
,
frame.logreg
,
logreg.testdat
Examples
data(logreg.savefit1)
# myanneal <- logreg.anneal.control(start = -1, end = -4, iter = 25000, update = 1000)
# logreg.savefit1 <- logreg(resp = logreg.testdat[,1], bin=logreg.testdat[, 2:21],
# type = 2, select = 1, ntrees = 2, anneal.control = myanneal)
tree1 <- eval.logreg(logreg.savefit1$model$trees[[1]], logreg.savefit1$binary)
tree2 <- eval.logreg(logreg.savefit1$model$trees[[2]], logreg.savefit1$binary)
alltrees <- eval.logreg(logreg.savefit1$model, logreg.savefit1$binary)