Skip to content

Help with a specific quantile regression problem

1 message · Helio Santana

#
Dear R community,

I am a beginner in quantile regression and I have a question about a
specific problem. I have used the quantreg package to fit a QR with
inequality constrains:

n <- 100
p <- 5
X <- matrix(rnorm(n*p),n,p)
y <- 0.95*apply(X,1,sum)+rnorm(n)
R <- cbind(0,rbind(diag(p),-diag(p)))
r <- c(rep(0,p),-rep(1,p))
model <- rq(y~X,R=R,r=r,method="fnc")

So,
However, if I try to impose no intercept in the last problem:

R <- cbind(0,rbind(diag(p),-diag(p)))
R <- R[,2:dim(R)[2]]
r <- c(rep(0,p),-rep(1,p))
model <- rq(y~X-1,R=R,r=r,method="fnc")

I obtain:
As you can see, this quantile value is not close to 0 as I expected. Have I
an error in the formulation of the QR?

Is it possible to fit a QR with inequality constrains and no intercept?

Is there another alternative for solving this kind of problem?

I would appreciate your comments.

Best regards,

Helio