title: clustered standard errors in statsmodel with multicolinearity problem
body: <p>I am using statsmodel for OLS regression. When I clustered the standard error, there was this warning message indicating multicolinearity issue. However, if I just fit the model <strong>without clustered errors</strong>, there is no such warning.</p>
  <pre><code>mod = smf.ols(formula = var ~ treatment_r1 + block + has_multiple_treat', data = df)
  mod_res = mod.fit(cov_type='cluster', cov_kwds={'groups': df['block']}, use_t=True)
  
  
  
  ValueWarning: covariance of constraints does not have full rank. The number of constraints is 3, but rank is 1
        'rank is %d' % (J, J_), ValueWarning)
  </code></pre>
  <p>I checked co-linearity following this post <a href="https://stackoverflow.com/questions/25676145/capturing-high-multi-collinearity-in-statsmodels">Capturing high multi-collinearity in statsmodels</a> and didn't find any problem.</p>
  <pre><code>corr = np.corrcoef(df_new[[&quot;var&quot;, &quot;has_multiple_treat&quot;, &quot;treatment_r1&quot;, &quot;block1&quot;]], rowvar=0)
  w, v = np.linalg.eig(corr)
  w
  np.linalg.det(corr)
  </code></pre>
  <p>The <em>var</em> can be a 0 or 1 variable or a continuous variable; <em>treatment_r1</em>, <em>has_multiple_treat</em> is a 0 or 1 variable; <em>block</em> is a categorical variable with two categories and in the df_new dataframe, I turned <em>block</em> into a dummy variable (<em>block1</em> and <em>block2</em>) and dropped block2.</p>