title: Confidence interval for quantile regression using bootstrap, categorical variables
body: <p>I am trying to get bootstrap confidence intervals for quantile regression . My regression response factors are mainly categorical variables. When I run the code boot.rq, I get the error below;</p>
  
  <p>NAs introduced by coercionError in boot.rq.xy(x, y, U, tau) : 
    NA/NaN/Inf in foreign function call (arg 7)</p>
  
  <p>Below is an example whereby I would like to calculate the confidence intervals for type;</p>
  
  <pre><code>library(car)
  library(quantreg)
  library(boot)
  newdata&lt;-Prestige
  mod2 = rq(income ~ education+ prestige + women + type, data=newdata)
  dat2 &lt;- newdata[,c("education","women","prestige","census","type")]
  mod3=boot.rq(cbind(1,dat2),newdata$income,tau=0.5, R=10000)
  </code></pre>
  
  <p>The illustration is from a previous discussion on this forum;</p>
  
  <p><a href="https://stackoverflow.com/questions/46395907/confidence-interval-for-quantile-regression-using-bootstrap">Confidence interval for quantile regression using bootstrap</a></p>