Learn R Programming

BSGS (version 2.0)

CompWiseGibbsSMP: Stochastic matching pursuit for variable selection.

Description

Perform MCMC procedure to generate the posterior samples to estimate posterior quantities of interest in Bayesian variable selection using stochastic matching pursuit approach (SMP).

Usage

CompWiseGibbsSMP(Y, X, beta.value, r, tau2, rho, sigma2, nu, lambda, num.of.inner.iter, num.of.iteration, MCSE.Sigma2.Given)

Arguments

Y
vector of observations of length $n$.
X
design matrix of dimension $n \times p$.
beta.value
Initial values of regression coefficients, $\beta$.
r
Initial values of indicator variables for individual regressors.
tau2
Variance in the prior distribution for regression coefficients.
rho
Prior probability including a variable.
sigma2
Initial value of $\sigma^2$.
nu
Given value in the prior distribution of $\sigma^2$.
lambda
Given value in the prior distribution of $\sigma^2$.
num.of.inner.iter
The number of iterations before sampling $\sigma^2$.
num.of.iteration
The number of iterations to be runned for sparse group variable selection.
MCSE.Sigma2.Given
Prespecified value which is used to stop simulating samples when the MCSE of estimate of $\sigma^2$ less then given values.

Value

$\beta$, variance $\sigma^2$, binary variables, $\gamma$, the number of iterations performed, and the time in second required for the run.

Examples

Run this code


## Not run: 
# CompWiseGibbsSMP(Y, X, beta.value, r, tau2, rho, sigma2, nu0, lambda0, 
# num.of.inner.iter, num.of.iteration, MCSE.Sigma2.Given)## End(Not run)

Run the code above in your browser using DataLab