Sparse Regression Quantile Fitting
Fit a quantile regression model using a sparse implementation of the Frisch-Newton interior-point algorithm.
rq.fit.sfn(a, y, tau = 0.5, rhs = (1-tau)*c(t(a) %*% rep(1,length(y))), control)
a |
structure of the design matrix X stored in csr format |
y |
response vector |
tau |
desired quantile |
rhs |
the right-hand-side of the dual problem; regular users shouldn't need to specify this, but in special cases can be quite usefully altered to meet special needs. See e.g. Section 6.8 of Koenker (2005). |
control |
control parameters for fitting routines: see |
This is a sparse implementation of the Frisch-Newton algorithm for quantile regression described in Portnoy and Koenker (1997). The sparse matrix linear algebra is implemented through the functions available in the R package SparseM.
coef |
Regression quantile coefficients |
ierr |
Error code for the internal Fortran routine
|
it |
Iteration count |
time |
Amount of time used in the computation |
Pin Ng
Portnoy, S. and R. Koenker (1997) The Gaussian Hare and the Laplacean Tortoise: Computability of Squared-error vs Absolute Error Estimators, (with discussion). Statistical Science, 12, 279-300.
Koenker, R and Ng, P. (2003). SparseM: A Sparse Matrix Package for R, J. of Stat. Software, 8, 1–9.
Koenker, R. (2005) Quantile Regression, Cambridge U. Press.
rq.fit.sfnc
for the constrained version,
SparseM
for a sparse matrix package for R
## An artificial example : n <- 200 p <- 50 set.seed(101) X <- rnorm(n*p) X[abs(X) < 2.0] <- 0 X <- cbind(1, matrix(X, n, p)) y <- 0.5 * apply(X,1,sum) + rnorm(n) ## true beta = (0.5, 0.5, ...) sX <- as.matrix.csr(X) try(rq.o <- rq.fit.sfn(sX, y)) #-> not enough tmp memory (tmpmax <- floor(1e5 + exp(-12.1)*(sX@ia[p+1]-1)^2.35)) ## now ok: rq.o <- rq.fit.sfn(sX, y, control = list(tmpmax= tmpmax))
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.