frame.logreg {LogicReg} | R Documentation |
Evaluates all components of one or more Logic Regression
models fitted by a single call to logreg
.
frame.logreg(fit, msz, ntr, newbin, newresp, newsep, newcens, newweight)
fit |
object of class logreg , that resulted from applying
the function logreg with
select = 1 (single model fit),
select = 2 (multiple model fit), or
select = 6 (greedy stepwise fit). |
msz |
if frame.logreg is executed on an object of class
logreg , that resulted from applying the function logreg
with select = 2 (multiple model fit)
or select = 6 (greedy stepwise fit) all logic trees for all
fitted models are returned. To restrict the model size and the number
of trees to some models, specify msz and ntr
(for select = 2 ) or just msz (for select = 6 ). |
ntr |
see msz . |
newbin |
binary predictors to evaluate the logic trees at. If
newbin is omitted, the original (training) data is used. |
newresp |
the response. If newbin is omitted, the
original (training) response is used. If newbin is specified
and newresp is omitted, the resulting
data frame will not have a
response column. |
newsep |
separate (linear) predictors. If newbin is
omitted, the original (training) predictors are used, even if
newsep is specified. |
newweight |
case weights. If newbin is omitted, the
original (training) weights are used. If newbin is specified
and newweight is omitted, the weights are taken to be 1. |
newcens |
censoring indicator. For proportional hazards models
and exponential survival models
only. If newbin is omitted, the original (training) censoring
indicators are used. If newbin is specified and newcens
is omitted, the censoring indicators are taken to be 1. |
This function calls eval.logreg
.
A data frame. The first column is the response, later columns are weights, censoring indicator, separate predictors (all of which are only provided if they are relevant) and all logic trees. Column names should be transparent.
Ingo Ruczinski ingo@jhu.edu and Charles Kooperberg clk@fhcrc.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.
logreg
,
eval.logreg
,
predict.logreg
,
logreg.testdat
data(logreg.savefit1,logreg.savefit2,logreg.savefit6) # # fit a single mode # 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) frame1 <- frame.logreg(logreg.savefit1) # # a complete sequence # myanneal2 <- logreg.anneal.control(start = -1, end = -4, iter = 25000, update = 0) # logreg.savefit2 <- logreg(select = 2, ntrees = c(1,2), nleaves =c(1,7), # oldfit = logreg.savefit1, anneal.control = myanneal2) frame2 <- frame.logreg(logreg.savefit2) # # a greedy sequence # logreg.savefit6 <- logreg(select = 6, ntrees = 2, nleaves =c(1,12), oldfit = logreg.savefit1) frame6 <- frame.logreg(logreg.savefit6, msz = 3:5) # restrict the size