predict.bess {BeSS} | R Documentation |
Similar to other predict methods, which returns predictions from a fitted "bess
" object.
## S3 method for class 'bess' predict(object, newdata, type = c("ALL", "opt", "AIC", "BIC", "GIC"),...)
object |
Output from the |
newdata |
New data used for prediction. |
type |
Types of predictor returned. |
... |
Additional arguments affecting the predictions produced. |
The object returned depends on the types of family.
Canhong Wen, Aijun Zhang, Shijie Quan, and Xueqin Wang.
Wen, C., Zhang, A., Quan, S. and Wang, X. (2017). BeSS: an R package for best subset selection in linear, logistic and CoxPH models. arXiv: 1709.06254.
data <- gen.data(500, 20, family = "gaussian", 10, 0.2, 1) fit <- bess(data$x, data$y, family = "gaussian") pred=predict(fit, newdata = data$x)