Predicted values Logic Regression

Description

Computes predicted values for one or more Logic Regression models that were fitted by a single call to logreg.

Usage

## S3 method for class 'logreg'
predict(object, msz, ntr, newbin, newsep, ...)

Arguments

objectObject 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).
mszif predict.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).
ntrsee msz
newbinbinary predictors to evaluate the logic trees at. If newbin is omitted, the original (training) data is used.
newsepseparate (linear) predictors. If newbin is omitted, the original (training) predictors are used, even if newsep is specified.
...other options are ignored

Details

This function calls frame.logreg.

Value

If object$select = 1, a vector with fitted values, otherwise a data frame with fitted values, where columns correspond to models.

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.

See Also

logregframe.logreglogreg.testdat

Examples

data(logreg.savefit1,logreg.savefit2,logreg.savefit6,logreg.testdat)
#
# 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)
z1 <- predict(logreg.savefit1)
plot(z1, logreg.testdat[,1]-z1, xlab="fitted values", ylab="residuals")
# myanneal2 <- logreg.anneal.control(start = -1, end = -4, iter = 25000, update = 0)
# logreg.savefit2 <- logreg(select = 2, nleaves =c(1,7), oldfit = logreg.savefit1,
#                 anneal.control = myanneal2)
z2   <- predict(logreg.savefit2)
# logreg.savefit6 <- logreg(select = 6, ntrees = 2, nleaves =c(1,12), oldfit = logreg.savefit1)
z6 <- predict(logreg.savefit6, msz = 3:5)