SSLASSO_2 {BBSSL} | R Documentation |

Spike-and-Slab LASSO is a spike-and-slab refinement of the LASSO procedure, using a mixture of Laplace priors indexed by `lambda0`

(spike) and `lambda1`

(slab).

The `SSLASSO`

procedure fits coefficients paths for Spike-and-Slab LASSO-penalized
linear regression models over a grid of values for the regularization
parameter `lambda0`

. The code has been adapted from the `SSLASSO`

package (Rockova, V. and Moran, G. (2019). Package ‘SSLASSO’.) such that now it does NOT normalize each column and allows specifying initialization value).

```
SSLASSO_2(X, y, initial.beta, penalty = c("adaptive", "separable"),
variance = c("fixed", "unknown"), lambda1, lambda0, nlambda = 100,
theta = 0.5, sigma = 1, a = 1, b, eps = 0.001, max.iter = 500,
counter = 10, warn = FALSE)
```

`X` |
The design matrix (n x p), without an intercept. |

`y` |
Vector of continuous responses (n x 1). The responses will be centered by default. |

`initial.beta` |
Initial value for beta when searching for the solution. |

`penalty` |
The penalty to be applied to the model. Either "separable"
(with a fixed |

`variance` |
Whether the error variance is also estimated. Either "fixed" (with a fixed |

`lambda1` |
Slab variance parameter. Needs to be less than |

`lambda0` |
Spike penalty parameters (L x 1). Either a numeric value for a single run (L=1) or a sequence of increasing values for dynamic posterior exploration. The default is |

`nlambda` |
The number of |

`theta` |
Prior mixing proportion. For "separable" penalty, this value is fixed. For "adaptive" penalty, this value is used as a starting value. |

`sigma` |
Error variance. For "fixed" variance, this value is fixed. For "unknown" variance, this value is used as a starting value. |

`a` |
Hyperparameter of the beta prior |

`b` |
Hyperparameter of the beta prior |

`eps` |
Convergence criterion: converged when difference in regression coefficients is less than |

`max.iter` |
Maximum number of iterations. Default is 500. |

`counter` |
Applicable only for the adaptive penalty. Determines how often the parameter |

`warn` |
TRUE if warnings should be printed; FALSE by default |

The sequence of models indexed by the regularization parameter
`lambda0`

is fitted using a coordinate descent algorithm. The algorithm uses
screening rules for discarding irrelevant predictors along the lines of Breheny (2011).

An object with S3 class `"SSLASSO"`

containing:

`beta` |
The fitted matrix of coefficients (p x L). The number of rows is
equal to the number of coefficients |

`intercept` |
A vector of length |

`iter` |
A vector of length |

`lambda0` |
The sequence of regularization parameter values in the path. |

`penalty` |
Same as above. |

`thetas` |
A vector of length |

`sigmas` |
A vector of length |

`select` |
A (p x L) binary matrix indicating which variables were selected along the solution path. |

`model` |
A single model chosen after the stabilization of the regularization path. |

Rockova, V. and George, E.I. (2018) The Spike-and-Slab LASSO. Journal of the American Statistical Association.

Moran, G., Rockova, V. and George, E.I. (2018) On variance estimation for Bayesian variable selection. <https://arxiv.org/abs/1801.03019>.

Nie, L., & Ročková, V. (2020). Bayesian Bootstrap Spike-and-Slab LASSO. arXiv:2011.14279.

```
## Linear regression, where p > n
p <- 1000
n <- 100
X <- matrix(rnorm(n*p), nrow = n, ncol = p)
beta <- c(1, 2, 3, rep(0, p-3))
y = X[,1] * beta[1] + X[,2] * beta[2] + X[,3] * beta[3] + rnorm(n)
# Oracle SSLASSO with known variance
result1 <- SSLASSO_2(X, y, penalty = "separable", theta = 3/p, initial.beta = rep(0,p))
plot(result1)
# Adaptive SSLASSO with known variance
result2 <- SSLASSO_2(X, y, initial.beta = rep(0,p))
plot(result2)
```

[Package *BBSSL* version 0.1.0 Index]