[R] quantreg Wald-Test

Roger Koenker rkoenker at illinois.edu
Sun Jul 29 17:17:51 CEST 2012


On Jul 28, 2012, at 8:55 AM, stefan23 wrote:

> Dear all,
> I know that my question is somewhat special but I tried several times to
> solve the problems on my own but I am unfortunately not able to compute the
> following test statistic using the quantreg package. Well, here we go, I
> appreciate every little comment or help as I really do not know how to tell
> R what I want it to do^^
> My situation is as follows: I have a data set containing a (dependent)
> vector Y and the regressor X. My aim is to check whether the two variables
> do not granger-cause each other in quantiles. I started to compute via
> quantreg for a single tau:= q:
> rq(Y_t~Y_(t-1)+Y_(t-2)+...+X_(t-1)+X_(t-2)+...,tau=q) 
> This gives me the quantile regression coefficients. Now I want to check
> whether all the coefficients of X are equal to zero (for this specific tau).
> Can I do this by applying rq.anova ? I have already asked a similiar
> question but I am not sure if anova is really calculating this for me..
> Currently I am calculating
> fitunrestricted=rq(Y_t~Y_(t-1)+Y_(t-2)+...+X_(t-1)+X_(t-2)+...,tau=q) 
> fitrestrited=rq(Y_t~Y_(t-1)+Y_(t-2)+...,tau=q)
> anova(fitrestricted,fitunrestricted)
> If this is correct can you tell me how the test value is calculated in this
> case,
Yes,  this gives a Wald test if test = "Wald"  is specified.  You need to read
the man page and the references mentioned there for further details.  R-help
isn't really intended to be a substitute for reading the literature.

> or in other words:
> My next step is going to replicate this procedure for a whole range of
> quantiles (say for tau in [a,b]). To apply a sup-Wald-test I am wondering if
> it is correct to choose the maximum of the different test values and to
> simulate the critical values by using the data tabulated in Andrees(1993)

Do you mean Andrews?  Such sup-Wald tests have been extensively discussed
in various places, simulating asymptotic critical values is probably the most
straightforward approach, but you need to be careful about tail behavior.

> (or simulate the vectors of independent Brownian Motions)...please feel free
> to comment, I am really looking forward to your help!
> Thank you very much 
> Cheers
> Stefan
> 
> 
> 
> 
> --
> View this message in context: http://r.789695.n4.nabble.com/quantreg-Wald-Test-tp4638198.html
> Sent from the R help mailing list archive at Nabble.com.
> 
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.



More information about the R-help mailing list