# 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.

$$E[y|x1,x2]=β0+β1x1+β2x2+β3x1x2 \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 $$β3\beta_3$$, the difference in slopes between the two groups in $$x1x_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 $$00$$ 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=0H_0: \beta_3 = 0$$ would work for you.