LogicReg (version 1.6.6)

eval.logreg: Evaluate a Logic Regression tree


This function evaluates a logic tree, typically a part of an object generated by logreg.


eval.logreg(ltree, data)


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.



an object of class logregmodel or an object of class logregtree. Typically this object will be part of the result of an object of class logreg, generated with select = 1 (single model fit), select = 2 (multiple model fit), or select = 6 (greedy stepwise fit).


a data frame on which the logic tree is to be evaluated. data should be binary, and have the same number of columns as the bin component of the original logreg fit.


Ingo Ruczinski ingo@jhu.edu and Charles Kooperberg clk@fredhutch.org


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


Run this code
# 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)

Run the code above in your browser using DataLab