[R] Making rq and bootcov play nice

John Gardner jrgardne at andrew.cmu.edu
Fri Jul 24 03:10:58 CEST 2009


I have a quick question, and I apologize in advance if, in asking, I
expose my woeful ignorance of R and its packages. I am trying to use
the bootcov function to estimate the standard errors for some
regression quantiles using a cluster bootstrap. However, it seems that
bootcov passes arguments that rq.fit doesn't like, preventing the
command from executing. Here is an example:

 e<-bootcov(rq(y~x),clust,B=10,fitter=rq.fit)

(where clust is my clustering variable) results in

Error in rq.fit.br(x, y, tau = tau, ...) :
  unused argument(s) (maxit = 15, penalty.matrix = NULL)

In contrast, the lm.fit function seems to just ignore these arguments,
resulting in the following warning:

10: In fitter(X[obs, , drop = FALSE], Y[obs, , drop = FALSE], maxit = maxit,  :
  extra arguments maxitpenalty.matrix are just disregarded.

Is there a way that I can either (a) modify bootcov so that it doesn't
pass these arguments or (b) modify rq so that it ignores them?

Thanks in advance,
John Gardner




More information about the R-help mailing list