predict.bma {BAS}R Documentation

Prediction Method for an object of class BMA

Description

Predictions under model averaging from a BMA object

Usage

## S3 method for class 'bma':
predict(object, newdata, top=NULL, ...)

Arguments

object An object of class BMA, created by bas
newdata new data for predictions
top Use only the top M models, based on posterior probabilities
... optional extra arguments

Value

a list of

Ybma predictions using BMA
Ypred matrix of predictions under each model
best index of top models included

Author(s)

Merlise Clyde

See Also

bas, fitted.bma

Examples

## Not run: 
data("Hald")
hald.gprior =  bas.lm(Y~ ., data=Hald, n.models=2^4, alpha=13, prior="g-prior", initprobs="Uniform")
predict(hald.gprior, hald.gprior$X, top=5)
## End(Not run)

[Package BAS version 0.1 Index]