Learn R Programming

BAS (version 1.2.2)

update.bma: Update BMA object using a new prior

Description

Update a BMA object using a new prior distribution on the coefficients.

Usage

"update"(object, newprior, alpha=NULL, ...)

Arguments

object
BMA object to update
newprior
Update posterior model probabilities, probne0, shrinkage, logmarg, etc, using prior based on newprior. See bas for available methods
alpha
optional new value of hyperparameter in prior for method
...
optional arguments

Value

Details

Recomputes the marginal likelihoods for the new methods for models already sampled in current object.

References

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 http://dx.doi.org/10.1198/jcgs.2010.09049

See Also

bas for available methods and choices of alpha

Examples

Run this code
## Not run: 
# library(MASS)
# data(UScrime)
# UScrime[,-2] = log(UScrime[,-2])
# crime.bic =  bas.lm(y ~ ., data=UScrime, n.models=2^15, prior="BIC",initprobs= "eplogp")
# crime.zs = update(crime.bic, newprior="ZS-null")
# ## End(Not run)

Run the code above in your browser using DataLab