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

bayes.model.selection

Bayesian regression model selection using G priors


Description

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

Usage

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

data(birdextinct)
logtime=log(birdextinct$time)
X=cbind(1,birdextinct$nesting,birdextinct$size,birdextinct$status)
bayes.model.selection(logtime,X,100)

LearnBayes

Functions for Learning Bayesian Inference

v2.15.1
GPL (>= 2)
Authors
Jim Albert
Initial release
2018-03-18

We don't support your browser anymore

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