[R] quantreg behavior changes for N>1000

Jeff G. jrg66 at comcast.net
Tue Jul 24 19:57:23 CEST 2007


Hello again R-experts and novices (like me),

This seems like a bug to me - or maybe it's intentional...can anyone 
confirm?  Up to 1000 reps, summary() of a rq object gives different 
output and subtly different confidence interval estimates.

Thanks....Jeff

testx=runif(1200)
testy=rnorm(1200, 5)

test.rq=summary(rq(testy[1:1000]~testx[1:1000], tau=2:98/100))
test.rq[[1]]
Gives this output:
Call: rq(formula = testy[1:1000] ~ testx[1:1000], tau = 2:98/100)

    tau: [1] 0.02

    Coefficients:
                  coefficients       lower bd   upper bd
    (Intercept)    3.00026         2.45142     3.17098
    testx[1:1000] -0.00870     -0.39817  0.49946

test.rq=summary(rq(testy[1:1001]~testx[1:1001], tau=2:98/100))
test.rq[[1]]

Gives this (different) output:
    Call: rq(formula = testy[1:1001] ~ testx[1:1001], tau = 2:98/100)

    tau: [1] 0.02

    Coefficients:
                  Value    Std. Error t value  Pr(>|t|)
   (Intercept)    3.00026  0.21605   13.88658  0.00000
    testx[1:1001] -0.00870  0.32976   -0.02638  0.97896


plot(test.rq, nrow=2, ncol=2) # The slope estimates appear to be the 
same but there are subtle differences in the confidence intervals, which 
shouldn't be due simply to the inclusion of one more point.



More information about the R-help mailing list