Quantile Regression Wald Test

13 views
Skip to first unread message

kai wang

unread,
May 31, 2024, 9:36:42 AMMay 31
to pystatsmodels
Hello, i have met some problems and i can't solve them. HELP.......

Here's the thing:
i have 2 QuantReg Models which are fitted with different quantiles(say Model1:q =0.25, Model2:q = 0.5),they have the same X and Y

How can i do the Wald Test? I mean is there any function available that i can use to test whether the slopes of these to models are the same?

Much thanks.

josef...@gmail.com

unread,
May 31, 2024, 9:57:00 AMMay 31
to pystat...@googlegroups.com
No, statsmodels does not have anything to compare estimates at different quantiles.

I have never seen this question before, and don't know how we could do this.
We cannot use standard tools like generalized method of moments, which I use for similar cases, because the usual standard errors (cov_params) do not apply because of the non-smoothness of the quantile regression function.
(The usual standard errors assume smooth, twice differentiable objective function, or differentiable moment conditions. Quantile regression uses standard errors that are specifically computed to account for the kink in the check function.)

~~ You could try to ask a question on stats.stackexchange "Cross Validated" to see if someone knows the theory or how to do it in R if that's possible.~~
Actually, the question has already been asked
Answer has references, but no R code mentioned.

Josef

--
You received this message because you are subscribed to the Google Groups "pystatsmodels" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pystatsmodel...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pystatsmodels/489a2fef-7297-4170-808e-bf73039b6ce3n%40googlegroups.com.

josef...@gmail.com

unread,
May 31, 2024, 10:47:28 AMMay 31
to pystat...@googlegroups.com
On Fri, May 31, 2024 at 9:56 AM <josef...@gmail.com> wrote:
No, statsmodels does not have anything to compare estimates at different quantiles.

I have never seen this question before, and don't know how we could do this.
We cannot use standard tools like generalized method of moments, which I use for similar cases, because the usual standard errors (cov_params) do not apply because of the non-smoothness of the quantile regression function.
(The usual standard errors assume smooth, twice differentiable objective function, or differentiable moment conditions. Quantile regression uses standard errors that are specifically computed to account for the kink in the check function.)

~~ You could try to ask a question on stats.stackexchange "Cross Validated" to see if someone knows the theory or how to do it in R if that's possible.~~
Actually, the question has already been asked
Answer has references, but no R code mentioned.

quick skimming of the 3 books:
Koenker has the cov_params when several quantiles are estimated section 3.2 and .3.3 (I have not looked at ch.4)
Hao & Naiman (2007)   AFAICS, they only have bootstrap for the 2-quantile case, no asymptotic cov_params
 Davino et al. (2013)  I don't see anything that would provide details for 2-quantile case

Based on a very brief look at cov_params across quantiles in Koenker.
AFAICS, we already have the required local kernel density estimates, but still need to get the covariance between quantiles using the individual kde.
(cov_params has a kronecker product a bit similar to multivariate regression with identical exog)
It does not look too bad but requires work.

Josef
Reply all
Reply to author
Forward
0 new messages