0

Using the excellent quantreg package and testing hypothesis of equal slopes between quantile 0.1 and 0.9 using standard anova function.

model <- food ~ income anova(rq(model,tau=0.1), rq(model,tau=0.9))

A zero p-val leads us to reject the null hypothesis that the slopes of q1 and q9 are equal

When running the same anova to compare quantile regression against OLS, there is an error

anova(rq(model,tau=0.5), lm(model))

Any suggestions?

lmo
  • 37,904
  • 9
  • 56
  • 69
rrg
  • 655
  • 2
  • 6
  • 24

1 Answers1

0

Testing with anova.rq only understands rq objects, in principle one could extend this to lm objects, I suppose, but things get a bit complicated. These notes meanmed by Tom Ferguson explain some details. In the regression setting things are a bit worse since one has local densities rather than one global one.