QR.lasso.cd {cqrReg} | R Documentation |
Quantile Regression (QR) with Adaptive Lasso Penalty (lasso) use Coordinate Descent (cd) Algorithms
Description
The adaptive lasso parameter base on the estimated coefficient without penalty function.
The algorithm base on greedy coordinate descent and Edgeworth's for ordinary l_1
regression. As explored by Tong Tong Wu and Kenneth Lange.
Usage
QR.lasso.cd(X,y,tau,lambda,beta,maxit,toler)
Arguments
X |
the design matrix |
y |
response variable |
tau |
quantile level |
lambda |
The constant coefficient of penalty function. (default lambda=1) |
beta |
initial value of estimate coefficient (default naive guess by least square estimation) |
maxit |
maxim iteration (default 200) |
toler |
the tolerance critical for stop the algorithm (default 1e-3) |
Value
a list
structure is with components
beta |
the vector of estimated coefficient |
b |
intercept |
Note
QR.lasso.cd(x,y,tau) work properly only if the least square estimation is good.
References
Wu, T.T. and Lange, K. (2008). Coordinate Descent Algorithms for Lasso Penalized Regression. Annals of Applied Statistics, 2, No 1, 224–244.
Wu, Yichao and Liu, Yufeng (2009). Variable selection in quantile regression. Statistica Sinica, 19, 801–817.
Examples
set.seed(1)
n=100
p=2
a=2*rnorm(n*2*p, mean = 1, sd =1)
x=matrix(a,n,2*p)
beta=2*rnorm(p,1,1)
beta=rbind(matrix(beta,p,1),matrix(0,p,1))
y=x%*%beta-matrix(rnorm(n,0.1,1),n,1)
# x is 1000*20 matrix, y is 1000*1 vector, beta is 20*1 vector with last ten zero value elements.
QR.lasso.cd(x,y,0.1)