README.md

sgslasso: sparse group-subgroup lasso

The R package sgslasso implements the sparse group-subgroup lasso.

The reference for the original pliable lasso can be found at: * Identification of important regressor groups, subgroups and individuals via regularization methods: application to gut microbiome data by Tanya P. Garcia et al (2014).

Installation

devtools::install_github("rakheon/sgslasso", force = TRUE)

Example

```

data generation for linear models

x <- matrix(rnorm(360), nrow=12) y <- 0.5x[1,] + 0.5x[2,] + 1.0*x[4,] + matrix(rnorm(30), nrow=1)

creating group-subgroup index matrix

index.subgroup <- matrix(NA,nrow=3,ncol=12) index.subgroup[1,1:2]=1; index.subgroup[1,3:4]=2 index.subgroup[2,5:6]=3; index.subgroup[2,7:8]=4 index.subgroup[3,9:10]=5; index.subgroup[3,11:12]=6

variable selection

out_lasso <- sgsl(x,y,type="lasso",index.subgroup = index.subgroup) out_group <- sgsl(x,y,type="group",index.subgroup = index.subgroup,tau=0.94) out_ggroup <- sgsl(x,y,type="ggroup",index.subgroup = index.subgroup,tau=0.94) out_ggroupind <- sgsl(x,y,type="ggroupind",index.subgroup = index.subgroup,tau=0.94)



rakheon/sgslasso documentation built on March 1, 2020, 11:46 a.m.