hqreg-package {hqreg} | R Documentation |
Regularization Paths for Lasso or Elastic-net Penalized Huber Loss Regression and Quantile Regression
Description
Efficient algorithms for fitting regularization paths for lasso or elastic-net penalized regression models with Huber loss, quantile loss or squared loss.
Details
Package: | hqreg |
Type: | Package |
Version: | 1.4 |
Date: | 2017-2-15 |
License: | GPL-3 |
Very simple to use. Accepts X,y
data for regression models, and
produces the regularization path over a grid of values for the tuning
parameter lambda
. Also provides functions for plotting, prediction and parallelized cross-validation.
Author(s)
Congrui Yi <congrui-yi@uiowa.edu>
References
Yi, C. and Huang, J. (2016)
Semismooth Newton Coordinate Descent Algorithm for
Elastic-Net Penalized Huber Loss Regression and Quantile Regression,
https://arxiv.org/abs/1509.02957
Journal of Computational and Graphical Statistics, accepted in Nov 2016
http://www.tandfonline.com/doi/full/10.1080/10618600.2016.1256816
Examples
X = matrix(rnorm(1000*100), 1000, 100)
beta = rnorm(10)
eps = 4*rnorm(1000)
y = drop(X[,1:10] %*% beta + eps)
# Huber loss
fit1 = hqreg(X, y)
coef(fit1, 0.01)
predict(fit1, X[1:5,], lambda = c(0.02, 0.01))
cv.fit1 = cv.hqreg(X, y)
plot(cv.fit1)
# Quantile loss
fit2 = hqreg(X, y, method = "quantile", tau = 0.2)
plot(fit2)
# Squared loss
fit3 = hqreg(X, y, method = "ls", preprocess = "rescale")
plot(fit3, xvar = "norm")
[Package hqreg version 1.4 Index]