Testing for statistical differences of quantile regression line slopes

If I were to compare the statistical similarity between the slopes of OLS regression lines from two independent samples, I would use a t-test to test if the slopes are equal or not. I’d like to compare the slopes of lines in a similar way obtained via quantile regression, however, I’m not sure if a t-test would be valid as the sample mean is used in the calculation.

Are there any specific methods used for this purpose? I’ve seen a lot of material on comparing OLS and quantile regression lines, or two OLS lines from independent samples but nothing on comparing two quantile regression lines in this way.


I would approach this similar to how I would approach it in “regular” linear regression (OLS): model the two variables and their interaction, and do inference on the interaction term.

The interpretation of the interaction term is that it is the difference in slopes between the two levels of the group variable, and this is the same whether the approach is OLS or quantile regression. (The exact interpretation changes, since quantile regression models conditional quantiles instead of conditional means, but the idea of a line with a slope is the same.)


Instead of fitting this model with OLS, fit it with quantile regression. Then you get a point estimate for β3, the difference in slopes between the two groups in x1.

Then you get into how to test for significance or create a confidence interval. I like the idea of testing via confidence interval and examining if 0 is in the confidence interval. The quantreg package in R has a number of methods for calculating confidence intervals. I would do it with bootstrap. If you truly need a p-value, perhaps a permutation test of H0:β3=0 would work for you.

Source : Link , Question Author : pbreach , Answer Author : Dave

Leave a Comment