title: VIF calculation in python statsmodel
body: <p>The code for calculating VIF in statsmodel is below: </p>
  
  <pre><code>k_vars = exog.shape[1]
  x_i = exog[:, exog_idx]
  mask = np.arange(k_vars) != exog_idx
  x_noti = exog[:, mask]
  r_squared_i = OLS(x_i, x_noti).fit().rsquared   ## NO INTERCEPT
  vif = 1. / (1. - r_squared_i)
  </code></pre>
  
  <p>When fitting, it does not include an intercept. It seems intercept should be included according to "Introductory Econometrics (6ed)" by Wooldridge: "... R-squared from regressing Xj on all other independent variables (<strong>and including an intercept</strong>)."</p>
  
  <p>Is statmodels wrong? Is there another package I can cross check? Thanks.</p>