QR.cd: Quantile Regression (QR) use Coordinate Descent (cd)...

View source: R/QR.cd.R

QR.cdR Documentation

Quantile Regression (QR) use Coordinate Descent (cd) Algorithms

Description

The algorithm base on greedy coordinate descent and Edgeworth's for ordinary l_1 regression.

Usage

QR.cd(X,y,tau,beta,maxit,toler)

Arguments

X

the design matrix

y

response variable

tau

quantile level

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.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.

Koenker, Roger. Quantile Regression, New York, 2005. Print.

Examples

set.seed(1)
n=100
p=2
a=rnorm(n*p, mean = 1, sd =1)
x=matrix(a,n,p)
beta=rnorm(p,1,1)
beta=matrix(beta,p,1)
y=x%*%beta-matrix(rnorm(n,0.1,1),n,1)
# x is 1000*10 matrix, y is 1000*1 vector, beta is 10*1 vector
QR.cd(x,y,0.1)

cqrReg documentation built on June 7, 2022, 9:06 a.m.

Related to QR.cd in cqrReg...