4

I understand that quantile regression estimates the conditional quantile of some measured variable (call the variable $y$), but can you use quantile regression to estimate an unconditional quantile of a distribution? For example, if I had 100 data points

$$y_1,...,y_{100}\sim N(\mu, \sigma^2)$$

then I could use some method to try to estimate the true quantile of the distribution, i.e., $q = \mu + z_\alpha\sigma$. But if I don't have any covariate information, can I still use quantile regression to estimate some quantile of interest from my data $y$?

2 Answers2

9

Why not try it and see?

set.seed(1234)
library(quantreg)

x <- rnorm(1000) m1 <- rq(x~1, c(0.1, 0.5, 0.9)) m1 #-1.2121 -0.03965, 1.33418 quantile(x, c(0.1, 0.5, 0.9)) #-1.21322 -0.03979 1.3344

Interestingly, the estimates from quantile regression are not exactly the actual quantiles, although they are very close. I don't know why.

I also tried some other distributions, and some were a little less close than the one above.

Peter Flom
  • 119,535
  • 36
  • 175
  • 383
5

YES

This is just a quantile regression on an intercept and nothing else. The theory is similar to how OLS linear regression on just an intercept gives the mean.

Minimizing the sum of squared deviations gives the mean, and minimizing the sum of quantile loss values gives the quantile.

Dave
  • 62,186
  • thanks for confirming my suspicions. I know it's an estimate, but do you actually recover the true form of the quantile of the distribution using quantile regression in this case? For example, if I knew the true quantile of my distribution was $q=\mu+z_\alpha\sigma$, does the quantile estimate lead to that equation? – John Smith Aug 10 '23 at 19:27
  • @JohnSmith No, you are not guaranteed to get the true value when you estimate from data. – Dave Aug 10 '23 at 19:46
  • Sorry, I need to learn to better state my questions. What I meant by recover the true form, is whether or not solving analytically the formula for the quantile regression gives you back the closed form solution for the quantile of the distribution of interest. So no data here but just maths. I'm attempting now to put pencil to paper by math skills is admittedly not that great – John Smith Aug 10 '23 at 20:09