This function conducts group-wise (with known groups) variable selection for quantile and robust mean regression with the group lasso penalty. The Huber loss is used for both types of regression model, where the quantile check function is approximated by Huber loss. A full solution path is generated unless a single value of the shrinkage parameter is specified.
hrq_glasso(
x,
y,
group.index,
tau = 0.5,
lambda = NULL,
weights = NULL,
w.lambda = NULL,
gamma = 0.2,
max_iter = 200,
apprx = "huber",
lambda.discard = TRUE,
method = "quantile",
scalex = TRUE,
epsilon = 1e-04,
beta0 = NULL
)
It returns a sequence of estimated coefficients for quantile regression with group feature selection corresponding to a sequence of lambda. The estimated coefficients are in the sparse matrix format. Returned values also include the sequence of lambda, the null deviance, values of penalized loss, and unpenalized loss across the sequence of lambda.
The estimated coefficients for all lambdas, stored in sparse matrix format, where each column corresponds to a lambda.
The sequence of lambdas.
The null deviance.
The value of penalized loss for each lambda.
The value of unpenalized loss for each lambda.
Group indices that correspond to the estimated coefficient matrix beta
.
The number of selected groups for each lambda.
Design matrix (in matrix format)
Response variable
A vector of group index, e.g., (1,1,1,2,2,2,3,3)
Percentile
Shrinkage parameter, default is NULL so that the algorithm chooses a sequence.
Observation weights, default is NULL
Weights for Shrinkage parameter of each group, default is NULL
Huber parameter. An initial value is 0.2, while the algorithm adaptively tunes the value in each iteration.
Maximum number of iteration
Approximation method. Default is huber
. The other option is tanh
which uses the hypertangent function to approximate the first order derivative of absolute loss.
Default is TRUE, meaning that the solution path stops if the relative deviance changes sufficiently small. It usually happens near the end of solution path. However, the program returns at least 70 models along the solution path.
Choice for mean or quantile regression. Default is quantile
.
Standardize design matrix. Default is TRUE.
The epsilon level convergence. Default is 1e-4.
Initial estimates. Default is NULL.
Sherwood, B., and Li, S. (2021) An Efficient Approach to Feature Selection and Estimation for Quantile Regression with Grouped Variables. Working paper.
Yang, Y., and Zou, H., (2015) A Fast Unified Algorithm for Solving Group-lasso Penalize Learning Problems, Statistics and Computing, 25 1129-1141. tools:::Rd_expr_doi("10.1007/s11222-014-9498-5").
n<- 100
p<- 10
x0<- matrix(rnorm(n*p),n,p)
X<- cbind(x0, x0^2, x0^3)[,order(rep(1:p,3))]
y<- -2+X[,1]+0.5*X[,2]-X[,3]-0.5*X[,7]+X[,8]-0.2*X[,9]+rt(n,2)
group<- rep(1:p, each=3)
fit<- hrq_glasso(X, y, group)
fit$beta[,8]
Run the code above in your browser using DataLab