I am performing the quantile regression in R on a non linear model (that is done by using nlrq). I am getting the coefficients for the desired quantiles (tau = 0.05, 0.50, 0.95). All very nice, but running the code without reasoning is not a good practice. As we determine quantiles at the extremes, i.e. 0.05, 0.95 (but they can also be smaller or larger.. for example tau = 0.0001), the regression results will be dependent on the number of points in the data sample (Also the coefficients will be more sensitive on the initial given value in the nlrq function). My questions are:

  1. Are there any rules for determining the minimum number of samples (sample size) needed to perform such quantile regressions (I mean then for every possible tau (from 0.0001 to 0.999)?
  2. How do we determine the confidence LEVEL of the quantile regression, e.g. at 0.05? (Level, not interval... I mean, if I get a regression line for tau = 0.05 how much is its confidence level? Or am I thinking wrong and I should look for the confidence interval/band?.. I used as tag "confidence-interval" because "confidence-Level" was not allowed)

If there is literature with indications, I will gladly read it... if possible with practical rules without complicated theorems.

Thank you all very much!


1 Answer 1


This would be easy to simulate but I suggest researching sample sizes for the simple cases that quantile regression reduces to when there is a single predictor and that predictor is categorical. For example for balanced binary X with n/2 observations at each X value, quantile regression with τ=0.95 is the same as computing sample quantiles stratified by X. There is literature on sample sizes needed for sample quantiles, with higher n needed for the more extreme quantiles.

For $\tau=0.5$ see this which when the Y distribution is known can be inverted to solve for $n$ such that the expected half-length of the confidence interval for the median meets a specified level of precision. When the Y distribution is unknown you'd need samples from this distribution to estimate the order statistics needed to plug into the confidence interval formula. There are probably similar formulas for $\tau \neq 0.5$.

  • $\begingroup$ Okay, thank you very much. Now the subject of the confidence interval is clearer to me. Now I have one more question: The nonlinear quantile regression is nonparametric and the code in R require initial values of the parameters to estimate. Is there a way to determine the minimum sample size to ensure the model to be not sensitive at the initial values? I see that my results are light depending on the initial values.. Or is there a way to determine the "correct" (if correct is the right word) initial values? Thanks! $\endgroup$
    – M B
    Commented Aug 7, 2023 at 9:11
  • $\begingroup$ I have not needed to provide any initial values. $\endgroup$ Commented Aug 7, 2023 at 13:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.