Warning: this function is no longer exported. 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 = 0.5,
lambda = NULL,
weights = NULL,
intercept = TRUE,
penalty = "SCAD",
a = 3.7,
iterations = 1,
converge_criteria = 1e-06,
alg = "LP",
penVars = NULL,
internal = FALSE,
...
)
Returns the following:
Coefficients from the penalized model.
Penalized objective function value. If scalex=TRUE then this is the value for the scaled version of x.
Residuals from the model.
Objective function evaluation without the penalty.
Coefficients from the penalized model.
Conditional quantile being modeled.
Sample size.
Penalty used, SCAD or MCP.
Penalty selected.
Matrix of predictors.
Vector of response values.
Conditional quantile being modelled.
Vector of lambdas. Default is for lambdas to be automatically generated.
Weights for the objective function.
Whether model should include an intercept. Constant does not need to be included in "x".
Type of penalty: "LASSO", "SCAD" or "MCP".
Additional tuning parameter for SCAD and MCP
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. QICD is no longer available.
Variables that should be penalized. With default value of NULL all variables are penalized.
Whether call to this function has been made internally or not.
Additional items to be sent to rq.lasso.fit.
Ben Sherwood, ben.sherwood@ku.edu and Adam Maidman.
Wang, L., Wu, Y. and Li, R. (2012). Quantile regression of analyzing heterogeneity in ultra-high dimension. J. Am. Statist. Ass, 107, 214--222.
Wu, Y. and Liu, Y. (2009). Variable selection in quantile regression. Statistica Sinica, 19, 801--817.
Zou, H. and Li, R. (2008). One-step sparse estimates in nonconcave penalized likelihood models. Ann. Statist., 36, 1509--1533.
Peng, B. and Wang, L. (2015). An iterative coordinate-descent algorithm for high-dimensional nonconvex penalized quantile regression. J. Comp. Graph., 24, 676--694.
if (FALSE) {
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