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.
 A: 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.)
$$
\mathbb E[y\vert x_1, x_2] = \beta_0 + \beta_1x_1 + \beta_2x_2 + \beta_3x_1x_2
$$
Instead of fitting this model with OLS, fit it with quantile regression. Then you get a point estimate for $\beta_3$, the difference in slopes between the two groups in $x_1$.
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 $H_0: \beta_3 = 0$ would work for you.
A: Couldn't you just run a pooled quantile regression y=betax + deltax*groupDummy? Seems easier to me, and presumably your favorite stats package will give you a confidence interval for delta. But I may be missing something.
