reg.sgl | R Documentation |
Fits sg-LASSO regression model.
The function fits sg-LASSO regression based on chosen tuning parameter selection method_choice
. Options include cross-validation and information criteria.
reg.sgl(x, y, gamma = NULL, gindex, intercept = TRUE, method_choice = c("tscv","ic","cv"), verbose = FALSE, ...)
x |
T by p data matrix, where T and p respectively denote the sample size and the number of regressors. |
y |
T by 1 response variable. |
gamma |
sg-LASSO mixing parameter. γ = 1 gives LASSO solution and γ = 0 gives group LASSO solution. |
gindex |
p by 1 vector indicating group membership of each covariate. |
intercept |
whether intercept be fitted ( |
method_choice |
choose between |
verbose |
flag to print information. |
... |
Other arguments that can be passed to |
reg.sgl object.
Jonas Striaukas
set.seed(1) x = matrix(rnorm(100 * 20), 100, 20) beta = c(5,4,3,2,1,rep(0, times = 15)) y = x%*%beta + rnorm(100) gindex = sort(rep(1:4,times=5)) reg.sgl(x = x, y = y, gamma = 0.5, gindex = gindex)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.