Package SSLASSO. August 28, 2018

Similar documents
Package glinternet. June 15, 2018

Package RAMP. May 25, 2017

Package TVsMiss. April 5, 2018

Package PUlasso. April 7, 2018

Package bayescl. April 14, 2017

Package freeknotsplines

Package parcor. February 20, 2015

Package msda. February 20, 2015

Package hiernet. March 18, 2018

Package glassomix. May 30, 2013

Package SOIL. September 20, 2017

Package SAM. March 12, 2019

Package glmmml. R topics documented: March 25, Encoding UTF-8 Version Date Title Generalized Linear Models with Clustering

Package bayesdp. July 10, 2018

Package flsa. February 19, 2015

Package msgps. February 20, 2015

Package flam. April 6, 2018

Package esabcv. May 29, 2015

Package BayesCR. September 11, 2017

Package listdtr. November 29, 2016

Package ordinalnet. December 5, 2017

Package robustreg. R topics documented: April 27, Version Date Title Robust Regression Functions

Package edrgraphicaltools

Package ADMM. May 29, 2018

Package mrbsizer. May 2, 2018

Package milr. June 8, 2017

Package mmtsne. July 28, 2017

Package palmtree. January 16, 2018

Package clustmixtype

Package simsurv. May 18, 2018

Package manet. September 19, 2017

Package clustvarsel. April 9, 2018

Package sparsenetgls

Package SeleMix. R topics documented: November 22, 2016

Package assortnet. January 18, 2016

The grplasso Package

Package BigVAR. R topics documented: April 3, Type Package

Package optimus. March 24, 2017

Package StVAR. February 11, 2017

Package biglars. February 19, 2015

Package gwrr. February 20, 2015

Package penalizedlda

Package rfsa. R topics documented: January 10, Type Package

Package scoop. September 16, 2011

Package RLT. August 20, 2018

Package bisect. April 16, 2018

Package rpst. June 6, 2017

Package clustering.sc.dp

Package endogenous. October 29, 2016

Package weco. May 4, 2018

Package polywog. April 20, 2018

Package orthodr. R topics documented: March 26, Type Package

Package CALIBERrfimpute

Package xwf. July 12, 2018

Package ConvergenceClubs

Package mixsqp. November 14, 2018

Package treedater. R topics documented: May 4, Type Package

Package apastyle. March 29, 2017

Package EBglmnet. January 30, 2016

Package nsprcomp. August 29, 2016

Linear Model Selection and Regularization. especially usefull in high dimensions p>>100.

Package MSGLasso. November 9, 2016

Package libstabler. June 1, 2017

Package RegularizedSCA

Package crochet. January 8, 2018

Package intccr. September 12, 2017

Package binomlogit. February 19, 2015

Package hgam. February 20, 2015

Package acebayes. R topics documented: November 21, Type Package

Package distance.sample.size

Package ECctmc. May 1, 2018

Package FisherEM. February 19, 2015

Package rgcvpack. February 20, Index 6. Fitting Thin Plate Smoothing Spline. Fit thin plate splines of any order with user specified knots

Package lhs. R topics documented: January 4, 2018

Package CuCubes. December 9, 2016

Picasso: A Sparse Learning Library for High Dimensional Data Analysis in R and Python

Package naivebayes. R topics documented: January 3, Type Package. Title High Performance Implementation of the Naive Bayes Algorithm

Package bayeslongitudinal

Package BayesLogit. May 6, 2012

Package inca. February 13, 2018

Package glmnetutils. August 1, 2017

Package mrm. December 27, 2016

Package Kernelheaping

Package SimilaR. June 21, 2018

Package missforest. February 15, 2013

Package reval. May 26, 2015

Package GADAG. April 11, 2017

Package orthogonalsplinebasis

Package pwrrasch. R topics documented: September 28, Type Package

Package morpheus. June 14, 2018

Package gamlss.spatial

Package Kernelheaping

Package TANDEM. R topics documented: June 15, Type Package

Package CVR. March 22, 2017

Package sgd. August 29, 2016

Package mfbvar. December 28, Type Package Title Mixed-Frequency Bayesian VAR Models Version Date

The glmmml Package. August 20, 2006

Package CausalImpact

Package dkdna. June 1, Description Compute diffusion kernels on DNA polymorphisms, including SNP and bi-allelic genotypes.

Package hsiccca. February 20, 2015

Transcription:

Package SSLASSO August 28, 2018 Version 1.2-1 Date 2018-08-28 Title The Spike-and-Slab LASSO Author Veronika Rockova [aut,cre], Gemma Moran [aut] Maintainer Gemma Moran <gmoran@wharton.upenn.edu> Description Efficient coordinate ascent algorithm for fitting regularization paths for linear models penalized by Spike-and-Slab LASSO of Rockova and George (2018) <doi:10.1080/01621459.2016.1260469>. URL http://faculty.chicagobooth.edu/veronika.rockova/ssl.pdf Depends License GPL-3 RoxygenNote 6.0.1 NeedsCompilation yes Repository CRAN Date/Publication 2018-08-28 17:54:27 UTC R topics documented: plot.sslasso....................................... 2 SSLASSO.......................................... 3 standard........................................... 5 Index 7 1

2 plot.sslasso plot.sslasso Plot coefficients from a "SSLASSO" object Description Usage Produces a plot of the coefficient paths for a fitted "SSLASSO" object. ## S3 method for class 'SSLASSO' plot(x,...) Arguments x Fitted "SSLASSO" model.... Other graphical parameters to plot. Author(s) Veronika Rockova <Veronika.Rockova@chicagobooth.edu> References Rockova, V. and George, E.I. (2018) The Spike-and-Slab LASSO. Journal of the American Statistical Association. See Also SSLASSO Examples ## Linear regression, where p>n library(sslasso) n=100 p=1000 X=matrix(rnorm(n*p), n, 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) lambda1<-0.1 lambda0<-seq(lambda1,100,length=50) theta<-0.5 # Separable penalty with fixed theta result<-sslasso(x, Y,penalty="separable", variance = "fixed",

SSLASSO 3 lambda1 = lambda1, lambda0 = lambda0,theta=theta) plot(result) SSLASSO The Spike-and-Slab LASSO Description Usage 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). SSLASSO(X, y, 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) Arguments X y penalty variance The design matrix (n x p), without an intercept. SSLASSO standardizes the data by default. Vector of continuous responses (n x 1). The responses will be centered by default. The penalty to be applied to the model. Either "separable" (with a fixed theta) or "adaptive" (with a random theta, where theta ~ B(a,p)). The default is "adaptive". Whether the error variance is also estimated. Either "fixed" (with a fixed sigma) or "unknown" (with a random sigma, where p(sigma) ~ 1/sigma). The default is "fixed". lambda1 Slab variance parameter. Needs to be less than lambda0. The default is lambda0 = 1. 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 lambda0 = seq(1, nrow(x), length.out = 100). nlambda The number of lambda0 values. Default is 100. theta sigma Prior mixing proportion. For "separable" penalty, this value is fixed. For "adaptive" penalty, this value is used as a starting value. 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(a,b) for the adaptive penalty (default a = 1).

4 SSLASSO b eps Hyperparameter of the beta prior B(a,b) for the adaptive penalty (default b = ncol(x)). Convergence criterion: converged when difference in regression coefficients is less than eps (default eps = 0.001). max.iter Maximum number of iterations. Default is 500. counter warn Details Value Applicable only for the adaptive penalty. Determines how often the parameter theta is updated throughout the cycles of coordinate ascent. Default is 10. 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 intercept iter lambda0 penalty thetas sigmas select model The fitted matrix of coefficients (p x L). The number of rows is equal to the number of coefficients p, and the number of columns is equal to L (the length of lambda0). A vector of length L containing the intercept for each value of lambda0. The intercept is intercept = mean(y) - crossprod(xx, beta), where XX is the centered design matrix. A vector of length L containing the number of iterations until convergence at each value of lambda0. The sequence of regularization parameter values in the path. Same as above. A vector of length L containing the hyper-parameter values theta (the same as theta for "separable" penalty). A vector of length L containing the values sigma (the same as the initial sigma for "known" variance). A (p x L) binary matrix indicating which variables were selected along the solution path. A single model chosen after the stabilization of the regularization path. Author(s) Veronika Rockova <Veronika.Rockova@chicagobooth.edu>, Gemma Moran <gmoran@wharton.upenn.edu> References 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>

standard 5 See Also plot.sslasso Examples ## 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) standard Standardizes a design matrix Description The function std accepts a design matrix and returns a standardized version of that matrix (i.e., each column will have mean 0 and mean sum of squares equal to 1). The code has been adapted from the ncvreg package (Breheny and Huang, 2011). Usage standard(x) Arguments X A matrix (or object that can be coerced to a matrix, such as a data frame).

6 standard Details Value This function centers and scales each column of X so that and n x ij = 0 i=1 n x 2 ij = n i=1 for all j. This is usually not necessary to call directly, as SSLASSO internally standardizes the design matrix, but inspection of the standardized design matrix can sometimes be useful. This differs from the base R function scale in two ways: (1) scale uses the sample standard deviation sqrt(sum(x^2)/(n-1)), while std uses the root-mean-square, or population, standard deviation sqrt(mean(sum(x^2))), and (2) std is faster. The reason for using the population standard deviation is that SSLASSO assumes that the columns of the design matrix have been scaled to have norm sqrt(n). The standardized design matrix, with attribues "center" and "scale" corresponding to the mean and (population) standard deviation used to scale the columns. Author(s) Patrick Breheny Examples X <- matrix(rnorm(50), 10, 5) S <- standard(x) apply(s, 2, sum) apply(s, 2, function(x) mean(x^2))

Index Topic models plot.sslasso, 2 Topic regression plot.sslasso, 2 plot.sslasso, 2, 5 scale, 6 SSLASSO, 2, 3 standard, 5 7