Weights in quantile regression for complex survey in R I want to include sample weights to my quantile regression model, but I'm not sure how to do this.  
I've already define my weight, which are replicated weights already given in survey dataset (computed in survey package): 
w<-svrepdesign(variables=data[,1:10],repweights=data[,11:30],type="BRR", 
  combined.weights=TRUE, weights=r.weights, rho=0.5,dbname="")

and my rq model is:
rq(y~x,tau=c(.1,.2,.3,.4,.5,.6,.7,.8,.9),data=my.data))

I tried to use withReplicates function, but with no success. Any suggestions? 
 A: i am not sure @Metrics answer will give the correct standard errors for a survey-weighted quantreg call.  here's an example of what you're trying to do.  you are certainly hitting a bug because the qr function nested within the withReplicates function at this point cannot handle multiple tau parameters at once (even though the qr function on its own might).  just call one at a time, perhaps like this :)
library(survey)
library(quantreg)

# load some fake data
data(scd)
repweights <-
    cbind(c(4,0,3,0,4,0), c(3,0,0,4,0,3),c(0,3,4,0,0,2),c(0,1,0,4,3,0))

# tack on the fake replicate weights
x <- cbind( scd , repweights )

# tack on some fake main weights
x[,9] <- c( 3 , 2 , 3 , 4 , 1 , 4 )

# name your weight columns
names( x )[ 5:9 ] <- c( paste0( 'rep' , 1:4 ) , "wgt" )

# create a replicate-weighted survey design object
scdrep <-
    svrepdesign(
        data = x ,
        type = "BRR" , 
        repweights = "rep" ,
        weights = ~wgt ,
        combined.weights = TRUE
    )

# loop through each desired value of `tau`
for ( i in seq( 0.1 , 0.9 , by = 0.1 ) ){

    print( i )

    # follow the call described here:
    # http://www.isr.umich.edu/src/smp/asda/Additional%20R%20Examples%20bootstrapping%20with%20quantile%20regression.pdf
    print( 
        withReplicates( 
            scdrep , 
            quote( 
                coef( 
                    rq( arrests ~ alive , tau = i , weights = .weights ) 
                ) 
            )
        )
    )

}

A: The usage of rq in quantreg package 
rq(formula, tau=.5, data, subset, weights, na.action,
method="br", model = TRUE, contrasts, ...)

where,
weights=vector of observation weights; if supplied, the algorithm fits to minimize the sum of the weights multiplied into the absolute residuals. The length of weights must be the same as the number of observations. The weights must be nonnegative and it is strongly recommended that they be strictly positive, since zero weights are ambiguous.
Please make sure whether you have zero weights in your observations. 
