bas.lm(formula, data, weights=NULL, n.models=NULL, prior="ZS-null", alpha=NULL, modelprior=beta.binomial(1,1), initprobs="Uniform", method="BAS", update=NULL, bestmodel = NULL, prob.local = 0.0, prob.rw=0.5, MCMC.iterations = NULL, lambda = NULL, delta = 0.025,thin=1)uniform
Bernoulli or beta.binomial with the
default being a beta.binomial(1,1). eplogprob function
to aproximate the Bayes factor from p-values from the full model to
find initial marginal inclusion probabilitites;
"marg-eplogp" useseplogprob.marg function to
aproximate the Bayes factor from p-values from the full model each
simple linear regression. To run a
Markov Chain to provide initial estimates of marginal
inclusion probabilities for "BAS", use method="MCMC+BAS" below. While the
initprobs are not used in sampling for method="MCMC", this
determines the order of the variables in the lookup table and
affects memory allocation in large problems where enumeration is not
feasible. For variables that should always be included set the
corresponding initprobs to 1, i.e. the intercept should be included with
probability one.
bas returns an object of class BMAAn object of class BAS is a list containing at least the following components:predict.bas)summary.bas, is used to print a summary of
the results. The function plot.bas is used to plot
posterior distributions for the coefficients and
image.bas provides an image of the distribution over models.
Posterior summaries of coefficients can be extracted using
coefficients.bma. Fitted values and predictions can be
obtained using the S3 functions fitted.bas and predict.bas.
BAS objects may be updated to use a different prior (without rerunning
the sampler) using the function update.bma.
initprobs,
which may impact the results in high-dimensional problems.
The deterinistic sampler provides a list of the top models in order of an
approximation of independence using the provided initprobs. This
may be effective after running the other algorithms to identify high
probability models and works well if
the correlations of variables are small to modest. The priors on
coefficients include Zellner's g-prior, the Hyper-g prior (Liang et al
2008, the Zellner-Siow Cauchy prior, Empirical Bayes (local and gobal)
g-priors. AIC and BIC are also included. Hoeting, J. A., Madigan, D., Raftery, A. E. and Volinsky, C. T. (1999) Bayesian model averaging: a tutorial (with discussion). Statist. Sci., 14, 382-401. http://www.stat.washington.edu/www/research/online/hoeting1999.pdf Liang, F., Paulo, R., Molina, G., Clyde, M. and Berger, J.O. (2008) Mixtures of g-priors for Bayesian Variable Selection. Journal of the American Statistical Association. 103:410-423. http://dx.doi.org/10.1198/016214507000001337
Zellner, A. (1986) On assessing prior distributions and Bayesian regression analysis with g-prior distributions. In Bayesian Inference and Decision Techniques: Essays in Honor of Bruno de Finetti, pp. 233-243. North-Holland/Elsevier. Zellner, A. and Siow, A. (1980) Posterior odds ratios for selected regression hypotheses. In Bayesian Statistics: Proceedings of the First International Meeting held in Valencia (Spain), pp. 585-603.
summary.bas,
coefficients.bma,
print.bas,
predict.bas,
fitted.bas
plot.bas,
image.bas,
eplogprob,
update.bma
demo(BAS.hald)
## Not run: demo(BAS.USCrime)
Run the code above in your browser using DataLab