Similar to cv.rq.pen function, but uses group penalty. Group penalties use the L1 norm instead of L2 for computational convenience. As a result of this the group lasso penalty is the same as the typical lasso penalty and thus you should only use a SCAD or MCP penalty. Only the SCAD and MCP penalties incorporate the group structure into the penalty. The group lasso penalty is implemented because it is needed for the SCAD and MCP algorithm. We use a group penalty extension of the QICD algorithm presented by Peng and Wang (2015).
rq.group.fit(x, y, groups, tau = 0.5, lambda, intercept = TRUE,
penalty = "SCAD", alg = "QICD", a=3.7, penGroups=NULL, ...)
Returns the following:
Coefficients of the model.
Residuals from the fitted model.
Unpenalized portion of the objective function.
Quantile being modeled.
Sample size.
Whether intercept was included in model.
Matrix of predictors.
Vector of response values.
Vector assigning columns of x to groups.
Conditional quantile being modelled.
Vector of lambdas. Default is for lambdas to be automatically generated.
Whether model should include an intercept. Constant does not need to be included in "x".
Type of penalty: "SCAD" or "MCP".
If set to QICD algorithm will use coordinate descent algorithm. Otherwise, will use a linear programming algorithm, which is an extension of algorithm used in rq.lasso.fit.
The additional tuning parameter for SCAD and MCP.
Specify which groups will be penalized. Default is to penalize all groups.
Additional arguments to be sent to rq.lasso.fit or groupQICD.
Ben Sherwood; Adam Maidman
[1] Yuan, M. and Lin, Y. (2006). Model selection and estimation in regression with grouped variables. J. R. Statist. Soc. B, 68, 49-67.
[2] Peng, B. and Wang, L. (2015). An Iterative Coordinate Descent Algorithm for High-Dimensional Nonconvex Penalized Quantile Regression. Journal of Computational and Graphical Statistics, 24, 676-694.
x <- matrix(rnorm(800),nrow=100)
y <- 1 + x[,1] - 3*x[,5] + rnorm(100)
cv_model <- rq.group.fit(x,y,groups=c(rep(1,4),rep(2,4)),lambda=1,penalty="SCAD")
Run the code above in your browser using DataLab