Learn R Programming

BAS (version 1.7.5)

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)

Value

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

Arguments

g

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

Author

Merlise Clyde

Details

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

See Also

g.prior, bas.glm

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

Examples

Run this code

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"
)

Run the code above in your browser using DataLab