You could use the survey package to run the bootstrapping, if you mean
the Rao & Wu bootstrap that samples n-1 of n PSUs in each replicate.
Set up a survey design object with bootstrap replicate weights: use
svrepdesign() if you already have replicate weights, use svydesign()
and then as.svrepdesign() to get R to make the replicate weights for
you.
Then use withReplicates() to run rq() for each set of replicate
weights and compute the variance.
-thomas
On Thu, Jan 27, 2011 at 11:18 AM, James Shaw <shawjw at gmail.com>
wrote:> I am new to R and am interested in using the program to fit quantile
> regression models to data collected from a multi-stage probability
> sample of the US population. ?The quantile regression package, rq, can
> accommodate person weights. ?However, it is not clear to me that
> boot.rq is appropriate for use with multi-stage samples (i.e., is
> capable of sampling primary sampling units instead of survey
> respondents). ?I would like to apply Rao's rescaling bootstrap
> procedure and poststratify the weights to population control totals in
> each bootstrap replicate. ?I know how to do all of this in Stata but
> have not yet seen any means of doing so in R. ?I ?presume I could do
> what is needed using batch processing but was hoping that there might
> be a way to pass the rq parameter estimates to a package that performs
> resampling variance estimation in order to simplify the task. ?Any
> programming suggestions or directions to informational resources would
> be greatly appreciated.
>
> Jim
>
> ______________________________________________
> R-help at r-project.org 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.
>
--
Thomas Lumley
Professor of Biostatistics
University of Auckland