sblm_gibbs: Gibbs sampler for a sparse Bayesian linear regression model

Description Usage Arguments Details Value References

View source: R/SBLM_run_chain.R

Description

This function runs a Gibbs sampler for a Bayesian linear regression model that explicitly allows for sparse solutions, in the spirit of the spike and slab prior (Mitchell and Beauchamp 1988). The difference with this model is that, instead of putting a prior on the coefficients with a point mass at 0, we use binary auxiliary variables to mask the effect of a variable from the predicted values. More details about the model can be found in UPDATE THIS LINK WHEN POST IS UP.

Usage

1
sblm_gibbs(X, y, hp = NULL, S, verbose = 0L)

Arguments

X

design matrix, of size N x P.

y

response vector of length N.

hp

list of hyperparameters. See Details for a description and default values used.

S

number of iterations for the chain.

verbose

integer. Function prints every verbose iterations. The default value of 0 prints no output.

Details

The following hyperparameters can be supplied by the user through hp. Default values for all are 1, and tend to work well.

Note that the default values for the prior of pi_z imply a uniform distribution on (0,1). If the number of columns in X is large, and you suspect that beta should be highly sparse, then reflecting this in the prior of pi_z would speed up computation considerably.

Value

A nested list with S elements, each one being a list of the values of the latent variables at every iteration.

References

Mitchell, Toby J, and John J Beauchamp. 1988. Bayesian Variable Selection in Linear Regression. Journal of the American Statistical Association, 83 (404). Taylor & Francis Group: 1023<e2><80><93>32.


miguelbiron/SBGLM documentation built on May 29, 2019, 8:23 p.m.