## S3 method for class 'bma}(object, newdata, top=NULL, ...)':
predictundefined- object
{An object of class BMA, 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}
a list of
- Ybma
{predictions using BMA}
- Ypred
{matrix of predictions under each model}
- best
{index of top models included}
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.
bas, fitted.bma
data("Hald")
hald.gprior = bas.lm(Y~ ., data=Hald, alpha=13, prior="g-prior")
predict(hald.gprior, hald.gprior$X[,-1], top=5)
[object Object]
regression