Using the R-package rqpd, I'm getting results I don't trust.
For a quantile value of 0.5, the results should be close to the results from plm. But that's not what I see:
set.seed(10)
m <- 3
n <- 10
s <- as.factor(rep(1:n,rep(m,n)))
x <- exp(rnorm(n*m))
u <- x*rnorm(m*n) + (1-x)*rf(m*n,3,3)
a <- rep(rnorm(n),rep(m,n))
y <- a + u
df <- as.data.frame(cbind(s, x, y))
fitrqpd <- rqpd(y ~ x | s, panel(lambda = 1), data=df)
summary(fitrqpd)
fitplm <- plm(y ~ x, model="within", index="s", data=df)
summary(fitplm)
Using rqpd, the 'effect' of x at q(0.5) is -3.1 Using plm, the 'effect' of x is -2.7
It's not a huge difference -- but it's not nothing. And: when I apply it to the data I'm actually working with, it's a much larger difference. (Effect of becoming unemployed on life satisfaction, using data from 'Understanding Society', UK: with plm, -0.31, with rqpd, -0.87)
If I use Stata and run xtqreg using the same data, the result for q(0.5) is -0.29 -- much closer to the R/plm result.
So, I'm not inclined to trust whatever it is that rqpd is doing. Should I?