bayes.model.selection: Bayesian regression model selection using G priors

Description Usage Arguments Value Author(s) Examples

Description

Using Zellner's G priors, computes the log marginal density for all possible regression models

Usage

1
bayes.model.selection(y, X, c, constant=TRUE)

Arguments

y

vector of response values

X

matrix of covariates

c

parameter of the G prior

constant

logical variable indicating if a constant term is in the matrix X

Value

mod.prob

data frame specifying the model, the value of the log marginal density and the value of the posterior model probability

converge

logical vector indicating if the laplace algorithm converged for each model

Author(s)

Jim Albert

Examples

1
2
3
4

Example output

$mod.prob
  log.m  Prob    NA     NA      NA
1 FALSE FALSE FALSE -92.05 0.00000
2  TRUE FALSE FALSE -77.39 0.00355
3 FALSE  TRUE FALSE -90.39 0.00000
4  TRUE  TRUE FALSE -73.26 0.21985
5 FALSE FALSE  TRUE -90.38 0.00000
6  TRUE FALSE  TRUE -76.51 0.00854
7 FALSE  TRUE  TRUE -88.51 0.00000
8  TRUE  TRUE  TRUE -72.01 0.76806

$converge
[1] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE

LearnBayes documentation built on May 1, 2019, 7:03 p.m.