Learn R Programming

BAS (version 0.4)

coef.bma: Coefficients of a Bayesian Model Average object

Description

Extract conditional posterior means and standard deviations, marginal posterior means and standard deviations, posterior probabilities, and marginal inclusions probabilities under Bayesian Model Averaging from an object of class BMA

Usage

## S3 method for class 'bma':
coef(object, ...)
## S3 method for class 'coef.bma':
print(x, n.models=5,digits = max(3, getOption("digits") - 3),...)

Arguments

object
object of class 'bma' created by BAS
x
object of class 'coef.bma' to print
n.models
Number of top models to report in the printed summary
digits
number of significant digits to print
...
other optional arguments

Value

  • coefficients returns an object of class coef.bma with the following:
  • conditionalmeansa matrix with conditional posterior means for each model
  • conditionalsdstandard deviations for each model
  • postmeanmarginal posterior means of each regression coefficient using BMA
  • postsdmarginal posterior standard deviations using BMA
  • postne0vector of posterior inclusion probabilities, marginal probability that a coefficient is non-zero

Details

Calculates posterior means and (approximate) standard deviations of the regression coefficients under Bayesian Model averaging using g-priors and mixtures of g-priors. Print returns overall summaries. For fully Bayesian methods that place a prior on g, the posterior standard deviations do not take into account full uncertainty regarding g. Will be updated in future releases.

References

Liang, F., Paulo, R., Molina, G., Clyde, M. and Berger, J.O. (2005) Mixtures of $g$-priors for Bayesian Variable Selection. http://www.stat.duke.edu/05-12.pdf

See Also

bas

Examples

Run this code
data("Hald")
hald.gprior =  bas.lm(Y~ ., data=Hald, n.models=2^4, alpha=13,
                      prior="ZS-null", initprobs="Uniform", update=10)
coef.hald.gprior = coefficients(hald.gprior)
coef.hald.gprior
plot(coef.hald.gprior)

Run the code above in your browser using DataLab