QR.mm | R Documentation |
The algorithm majorizing the objective function by a quadratic function followed by minimizing that quadratic.
QR.mm(X,y,tau,beta,maxit,toler)
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) |
a list
structure is with components
beta |
the vector of estimated coefficient |
b |
intercept |
QR.mm(x,y,tau) work properly only if the least square estimation is good.
David R.Hunter and Kenneth Lange. Quantile Regression via an MM Algorithm, Journal of Computational and Graphical Statistics, 9, Number 1, Page 60–77
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.mm(x,y,0.1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.