Produces penalized quantile regression models for a range of lambdas and penalty of choice. If lambda is unselected than an iterative algorithm is used to find a maximum lambda such that the penalty is large enough to produce an intercept only model. Then range of lambdas goes from the maximum lambda found to "eps" on the log scale. Local linear approximation approach used by Wang, Wu and Li to extend LLA as proposed by Zou and Li (2008) to the quantile regression setting.
rq.nc.fit(x,y,tau=.5,lambda=NULL,weights=NULL,intercept=TRUE,
penalty="SCAD",a=3.7,iterations=10,
converge_criteria=1e-06,alg=ifelse(p
Returns the following:
Coefficients from the penalized model.
Penalized objective function value.
Residuals from the model.
Objective function evaluation without the penalty.
Conditional quantile being modeled.
Sample size.
Penalty used, SCAD or MCP.
Matrix of predictors.
Vector of response values.
Conditional quantile being modeled.
Tuning parameter.
Weights for the objective function.
Whether model should include an intercept. Constant does not need to be included in "x".
MCP or SCAD.
Second tuning parameter.
Number of iterations to be done for iterative LLA algorithm.
Difference in betas from iteration process that would satisfy convergence.
Defaults for small p to linear programming (LP), see Wang, Wu and Li (2012) for details. Otherwise a coordinate descent algorithm is used (QICD), see Peng and Wang (2015) for details. Both methods rely on the One-step sparse estimates algorithm.
Variables that should be penalized. With default value of NULL all variables are penalized.
Additional items to be sent to rq.lasso.fit.
Ben Sherwood; Adam Maidman
[1] Wang, L., Wu, Y. and Li, R. (2012). Quantile regression of analyzing heterogeneity in ultra-high dimension. J. Am. Statist. Ass, 107, 214--222.
[2] Wu, Y. and Liu, Y. (2009). Variable selection in quantile regression. Statistica Sinica, 19, 801--817.
[3] Zou, H. and Li, R. (2008). One-step sparse estimates in nonconcave penalized likelihood models. Ann. Statist., 36, 1509--1533.
[4] Peng, B. and Wang, L. (2015). An iterative coordinate-descent algorithm for high-dimensional nonconvex penalized quantile regression. J. Comp. Graph., 24, 676--694.
x <- matrix(rnorm(800),nrow=100)
y <- 1 + x[,1] - 3*x[,5] + rnorm(100)
scadModel <- rq.nc.fit(x,y,lambda=1)
Run the code above in your browser using DataLab