[R] quantreg behavior changes for N>1000

roger koenker rkoenker at uiuc.edu
Tue Jul 24 20:29:13 CEST 2007


When in doubt:  RTFM --  Quoting from ?summary.rq

se: specifies the method used to compute standard standard
           errors.  There are currently five available methods:

              1.  '"rank"' which produces confidence intervals for the
                 estimated parameters by inverting a rank test as
                 described in Koenker (1994).  The default option
                 assumes that the errors are iid, while the option iid =
                 FALSE implements the proposal of Koenker Machado
                 (1999).  This is the default method unless the sample
                 size exceeds 1001, or cov = FALSE in which case se =
                 "nid" is used.

url:    www.econ.uiuc.edu/~roger            Roger Koenker
email    rkoenker at uiuc.edu            Department of Economics
vox:     217-333-4558                University of Illinois
fax:       217-244-6678                Champaign, IL 61820


On Jul 24, 2007, at 12:57 PM, Jeff G. wrote:

> 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.
>
> ______________________________________________
> R-help at stat.math.ethz.ch 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