| update.bas | R Documentation |
Update a BMA object using a new prior distribution on the coefficients.
## S3 method for class 'bas'
update(object, newprior, alpha = NULL, ...)
object |
BMA object to update |
newprior |
Update posterior model probabilities, probne0, shrinkage,
logmarg, etc, using prior based on newprior. See |
alpha |
optional new value of hyperparameter in prior for method |
... |
optional arguments |
Recomputes the marginal likelihoods for the new methods for models already sampled in current object.
A new object of class BMA
Merlise Clyde clyde@stat.duke.edu
Clyde, M. Ghosh, J. and Littman, M. (2010) Bayesian Adaptive
Sampling for Variable Selection and Model Averaging. Journal of
Computational Graphics and Statistics. 20:80-101
\Sexpr[results=rd]{tools:::Rd_expr_doi("10.1198/jcgs.2010.09049")}
bas for available methods and choices of alpha
Other bas methods:
BAS,
bas.lm(),
coef.bas(),
confint.coef.bas(),
confint.pred.bas(),
diagnostics(),
fitted.bas(),
force.heredity.bas(),
image.bas(),
plot.confint.bas(),
predict.bas(),
predict.basglm(),
summary.bas(),
variable.names.pred.bas()
library(MASS)
data(UScrime)
UScrime[,-2] <- log(UScrime[,-2])
crime.bic <- bas.lm(y ~ ., data=UScrime, n.models=2^10, prior="BIC",initprobs= "eplogp")
crime.ebg <- update(crime.bic, newprior="EB-global")
crime.zs <- update(crime.bic, newprior="ZS-null")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.