Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

testBF.prior

Test based Bayes Factors for BMA Models


Description

Creates an object representing the prior distribution on coefficients for BAS that corresponds to the test-based Bayes Factors.

Usage

testBF.prior(g)

Arguments

g

a scalar used in the covariance of Zellner's g-prior, Cov(beta) = sigma^2 g (X'X)^-

Details

Creates a prior object structure used for BAS in 'bas.glm'.

Value

returns an object of class "prior", with the family and hyerparameters.

Author(s)

Merlise Clyde

See Also

Other beta priors: CCH(), EB.local(), IC.prior(), Jeffreys(), TG(), beta.prime(), g.prior(), hyper.g.n(), hyper.g(), intrinsic(), robust(), tCCH()

Examples

testBF.prior(100)
library(MASS)
data(Pima.tr)

# use g = n
bas.glm(type ~ .,
  data = Pima.tr, family = binomial(),
  betaprior = testBF.prior(nrow(Pima.tr)),
  modelprior = uniform(), method = "BAS"
)

BAS

Bayesian Variable Selection and Model Averaging using Bayesian Adaptive Sampling

v1.5.5
GPL (>= 3)
Authors
Merlise Clyde [aut, cre, cph] (ORCID=0000-0002-3595-1872), Michael Littman [ctb], Quanli Wang [ctb], Joyee Ghosh [ctb], Yingbo Li [ctb], Don van de Bergh [ctb]
Initial release
2020-1-24

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.