Description Usage Arguments Details Value Author(s) References See Also Examples

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 `ncvreg`

package (Breheny and Huang, 2011).

1 2 3 |

`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. |

`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. |

Veronika Rockova <[email protected]>, Gemma Moran <[email protected]>

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>

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | ```
## Linear regression, where p > n
library(SSLASSO)
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(X, y, penalty = "separable", theta = 3/p)
plot(result1)
# Adaptive SSLASSO with known variance
result2 <- SSLASSO(X, y)
plot(result2)
# Adaptive SSLASSO with unknown variance
result3 <- SSLASSO(X, y, variance = "unknown")
plot(result3)
``` |

SSLASSO documentation built on Aug. 29, 2018, 1:03 a.m.

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.