title: Singular matrix errors in quantile regressions
body: <p>I'm trying to run some quantile regressions in <code>R</code>. The response variable is continuous. The predictor variables are categorical, taking values <code>[0, 1, 2, 3, 4]</code>.</p>
  
  <p>Every time I try to do any analysis, I get error messages (examples of commands and errors below).</p>
  
  <pre><code>summary(rq(HoursFlex ~ EnvtBenefits, tau = taus), se = "nid")
  Error in base::backsolve(r, x, k = k, upper.tri = upper.tri, transpose = transpose, :
  singular matrix in 'backsolve'. First zero in diagonal [5]
  
  ggplot(data = s1, aes(EnvtBenefits, HoursFlex)) + geom_point() + geom_quantile(quantiles = taus, col = "gray") + geom_quantile(quantiles = 0.5, col = "blue") + geom_smooth(method="lm", col = 2)
  Smoothing formula not specified. Using: y ~ x
  Warning messages: 1: Computation failed in stat_quantile(): Singular design matrix
  
  plot(summary(rq(HoursFlex ~ Milieu, tau = taus)))
  Error in plot.window(...) : infinite axis extents [GEPretty(-inf,inf,5)]
  </code></pre>
  
  <p>And as a result, it's not even letting me test for any 2-way or 3-way interactions between the predictors. Does anyone know what the problem might be? I'm quite new to <code>R</code> and don't know what's going on!!</p>
  
  <p>Edit: I'm including a small subset of the data; predictors are coded as categorical using the as.factor function</p>
  
  <p><a href="https://i.stack.imgur.com/v0udP.png" rel="nofollow noreferrer">Continuous response variable and select categorical predictors</a></p>