Learn R Programming

BayesBridge (version 0.6)

bridge.EM: Bridge Regression - Expectation Maximization

Description

Expectation Maximization for bridge regression.

Usage

bridge.EM  (y, X, alpha=0.5, ratio=1.0, lambda.max=1e9*ratio, 
  tol=1e-9, max.iter=30, use.cg=FALSE, ret.solves=FALSE)

bridge.EM.R(y, X, alpha, ratio=1.0, lambda.max=1e9*ratio, tol=1e-9, max.iter=30, init=NULL)

Arguments

y
An N dimensional vector of data.
X
An N x P dimensional design matrix.
ratio
The ratio tau/sigma.
alpha
A parameter.
lambda.max
A cut-off used to determine when a variable vanishes.
tol
The threshold at which the algorithm terminates.
max.iter
The maximum number of iterations to use.
use.cg
Use the conjugate gradient method.
ret.solves
Return the number of times a linear system is solved.
init
Initial value.

Details

Bridge regression is a regularized regression in which the regression coefficient's prior is an exponential power distribution. Specifically, inference on the regression coefficient beta is made using the model

$$y = X \beta + \epsilon, \epsilon \sim N(0, \sigma^2 \; I),$$ $$p(\beta) \propto \exp(\sum_j -(|\beta_j|/\tau)^{\alpha}).$$

This procedure calculates the posterior mode of beta, given ratio=$\tau/\sigma$ and alpha using the expectation maximization algorithm.

References

Nicolas G. Poslon, James G. Scott, and Jesse Windle. The Bayesian Bridge. http://arxiv.org/abs/1109.2279.

See Also

bridge.reg.

Examples

Run this code
# Load the diabetes data...
data(diabetes, package="BayesBridge");
cov.name = colnames(diabetes$x);
y = diabetes$y;
X = diabetes$x;

# Center the data.
y = y - mean(y);
mX = colMeans(X);
for(i in 1:442){
    X[i,] = X[i,] - mX;
}

# Expectation maximization.
bridge.EM(y, X, 0.5, 1.0, 1e8, 1e-9, 30, use.cg=TRUE);

Run the code above in your browser using DataLab