title: Statsmodels - OLS Clustered Standard Errors (not accepting Series from DF?)
body: <p>I am running an analysis that could benefit from clustering by BEA regions.  I have not used the clustered standard error option in Statsmodels before, so I am unclear of whether or not I am messing up the syntax, or the option is broken.  Any help would be greatly appreciated.</p>
  
  <p>Here is the relevant section of code (note that the <code>topline_specs</code> dict returns Patsy-style formulas):</p>
  
  <pre><code>#Capture topline specs
  topline_specs={'GO':spec_dict['PC_GO']['Total']['TYPE']['BOTH'],
                 'RV':spec_dict['PC_RV']['Total']['TYPE']['BOTH'],
                 'ISSUER':spec_dict['PROP']['ISSUER']['TYPE']['BOTH'],
                 'PURPOSE':spec_dict['PROP']['PURPOSE']['TYPE']['BOTH']}
  
  #Estimate each model
  topline_mods={'GO':smf.ols(formula=topline_specs['GO'],data=data_d).fit(cov_type='cluster',
                                                                         cov_kwds={'groups':data_d['BEA_INT']})}
  
  topline_mods['GO']
  </code></pre>
  
  <p>The traceback stems from a numpy call.  It returns the following:</p>
  
  <pre><code>ValueError: The weights and list don't have the same length.
  </code></pre>
  
  <p>Everything I could find on the use of clustered standard errors looked like the <code>cov_kwds</code> argument can take a Series from the DataFrame housing the model data.  What am I missing?</p>