Description Usage Arguments Details Value References Examples
Computes lasso, group lasso, scaled lasso, or scaled group lasso solution.
The outputs are coefficient-estimate and subgradient. If type = "slasso"
or type = "sgrlasso", the output will include estimated standard deviation.
| 1 2 | 
| X | predictor matrix. | 
| Y | response vector. | 
| type | type of penalty. Must be specified to be one of the following:
 | 
| lbd | penalty term of lasso. By letting this argument be  | 
| group | 
 | 
| weights | weight vector with length equal to the number of groups. Default is
 | 
| verbose | logical. Only available for  | 
| ... | auxiliary arguments for  | 
Computes lasso, group lasso, scaled lasso, or scaled group lasso solution. Users can specify the value of lbd or choose to run cross-validation to get optimal lambda in term of mean squared error. Coordinate decent algorithm is used to fit scaled lasso and scaled group lasso models.
| B0 | coefficient estimator. | 
| S0 | subgradient. | 
| sigmaHat | estimated standard deviation. | 
| lbd, weights, group | same as input arguments. | 
Mitra, R. and Zhang, C. H. (2016), "The benefit of group sparsity in group inference with de-biased scaled group lasso," Electronic Journal of Statistics, 10, 1829-1873.
Yang, Y. and Zou, H. (2015), “A Fast Unified Algorithm for Computing Group-Lasso Penalized Learning Problems,” Statistics and Computing, 25(6), 1129-1141.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | set.seed(123)
n <- 50
p <- 10
X <- matrix(rnorm(n*p), n)
Y <- X %*% c(1, 1, rep(0, p-2)) + rnorm(n)
#
# lasso
#
lassoFit(X = X, Y = Y, type = "lasso", lbd = .5)
#
# group lasso
#
lassoFit(X = X, Y = Y, type = "grlasso", lbd = .5, weights = rep(1,2),
           group = rep(1:2, each=5))
#
# scaled lasso
#
lassoFit(X = X, Y = Y, type = "slasso", lbd = .5)
#
# scaled group lasso
#
lassoFit(X = X, Y = Y, type = "sgrlasso", lbd = .5, weights = rep(1,2),
           group = rep(1:2, each=5))
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.