sglasso: Standardized Group LASSO

Description Usage Arguments Value References Examples

View source: R/penreg.R

Description

This utilizes a group lasso penalty which operates on orthonormalized projections of the covariates. The advantage of this is that by treating the terms for each variable as a group of coefficients, entire variable groups can be dropped from the model at once more efficiently.

As in the elastic net, the L1 shrinkage penalty is λ_1 = α * λ, and the L2 shrinkage penalty is λ_2 = (1-α) * λ. This results in smoothing of the covariates within each group. This differs from the sparse group LASSO which imposes within-group L1 penalities instead.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
sglasso(
  X,
  y,
  idx,
  alpha = 0.75,
  lambda = NULL,
  nlambda = 100,
  maxit = 1000,
  min.lam.frac = 0.05,
  wch.pen = rep(1, length(index)),
  opt.crit = c("fpe", "aic", "bic")
)

Arguments

X

the covariates. must be in the same order as the group labels. it is recommended to sort the variables by group.

y

a continuous outcome

idx

the group label assignments. must be in the same order as the covariates.

alpha

the penalty mixing parameter, which can take values of 0 ≤ α ≥ 1. defaults to 0.75.

lambda

the shrinkage parameter or a sequence of shrinkage parameters. if left as NULL, a sequence will be generated with the length given by nlambda.

nlambda

the number of lambda values to try. defaults to 100.

maxit

maximum number of iterations

min.lam.frac

the rate of the smallest lambda to the largest lambda. defaults to 0.05.

wch.pen

which variables to penalize. defaults to a sequence of 1s of length equal to the number of variables represented by spline terms. provide a list with entries of 0 for the variable(s) you desire to leave unpenalized. d.

opt.crit

the criterion to maximize for finding the optimal lambda when a sequence is used. must be one of "fpe" (final prediction error; the default) or "bic" (Bayesian Information Criterion).

Value

a penreg object

References

Simon, N., & Tibshirani, R. (2012). Standardization and the Group Lasso Penalty. Statistica Sinica, 22(3), 983-1001. Retrieved March 17, 2020 doi: 10.5705/ss.2011.075

Examples

1
sglasso(Alz$x,Alz$ab_42,Alz$idx,nlambda = 30, min.lam.frac = 0.01, alpha = 0.65)

abnormally-distributed/cvreg documentation built on May 3, 2020, 3:45 p.m.