data("Hald")
hald.gprior = bas.lm(Y~ ., data=Hald, alpha=13, prior="g-prior")
predict(hald.gprior, top=5, predict=FALSE, se.fit=TRUE) # default is BMA
predict(hald.gprior, newdata=Hald, estimator="MPM", se.fit=TRUE, prediction=FALSE)
# same as fitted
fitted(hald.gprior,estimator="MPM")
Run the code above in your browser using DataLab