predict.bas: Prediction Method for an object of class BMA
Description
Predictions under model averaging from a BMA object
Usage
## S3 method for class 'bas':
predict(object, newdata, top=NULL, ...)
Arguments
object
An object of class BAS, created by bas
newdata
new matrix or vector of data for predictions. May
include a column for the intercept or just the predictor variables
top
Use only the top M models, based on posterior
probabilities
...
optional extra arguments
Value
a list of
Ybmapredictions using BMA
Ypredmatrix of predictions under each model
bestindex of top models included
Details
Use BMA to form predictions using the top highest probability
models. Currently newdata must be in the form of a matrix or vector
with variables in the same order as in the model matrix used to obtain
the BMA object (see object$X). Future versions
will allow newdata to be a dataframe.