Thread: Hypothesis testing multiple quantiles in quantile regression (quantreg package)

1. Hypothesis testing multiple quantiles in quantile regression (quantreg package)

Consider a simple quantile regression with 1 regressor. I want to do two things:

1) Compare whether the slope parameter is equal

2) Do the same over all .

I've identified anova(model1,model2,model3) as being a way that works, where model1 is the "rq" object (quantile regression fit) over . However, for the test over 9 quantiles I don't want to type anova(model1,model2,......,model9), and for the test over 99 quantiles I don't want to do it for 99 models.

I've tried generating a list of length 9 and 99 (for my two goals) using lapply() over different 's. However, anova() won't accept this.

I've also tried working with object "rqs" instead of default "rq". However, that doesn't work either. FYI here is how you generate an "rqs" object. It's basically an "rq" regression over all specified quantiles within 1 object. So I'll generate it for the 99 quantiles.

Code:
y = rnorm(100)
x = rnorm(100)

rqs_object <- rq(y~x,tau=1:99/100)
Here's an example of an "rq" object (the one that works with anova()):

Code:
y = rnorm(100)
x = rnorm(100)

rq_object <- rq(y~x,tau=0.5) #median regression
So how do I get this to work? I see that anova.rq in the package accepts rqlist object type but extensive google searching still has not revealed what this object type is.

2. Re: Hypothesis testing multiple quantiles in quantile regression (quantreg package)

What about the default graphing function for quantreg models. My vague memory from using it a couple of years ago is that the default plot gives an indication of which slopes are significantly above or below the ols regression line.

3. Re: Hypothesis testing multiple quantiles in quantile regression (quantreg package)

plot() accepts rqs perfectly fine.

anova() (or, equivalently, "anova.rq" in the quantreg documentation) doesn't.

The head author has requested formal joint hypothesis testing as well as plots.

I think I just need a way to create something that contains all 99 models that anova() will accept without typing out anova(model1,model2...........).

 Tweet

Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts