title: Why does OLS raise LinAlgError: SVD did not converge?
body: <p>I have an array:</p>
  
  <pre><code>Num Col2 Col3  Col4  
  1   6     1     1   
  2   60    0     2   
  3   60    0     1   
  4   6     0     1   
  5   60    1     1   
  </code></pre>
  
  <p>And the code:</p>
  
  <pre><code>y = df.loc[:,'Col3']  # response
  X = df.loc[:,['Col2','Col4']]  # predictor
  X = sm.add_constant(X) #add constant
  est = sm.OLS(y, X) #build regression
  est = est.fit() #full model
  </code></pre>
  
  <p>And when it reaches .fit() it raises an error which is:</p>
  
  <pre><code>Traceback (most recent call last):
  File "D:\Users\Anna\workspace\mob1\mobols.py", line 36, in &lt;module&gt;
  est = est.fit() #full model
  File "C:\Python27\lib\site-packages\statsmodels\regression\linear_model.py", line 174, in fit
  self.pinv_wexog, singular_values = pinv_extended(self.wexog)
  File "C:\Python27\lib\site-packages\statsmodels\tools\tools.py", line 392, in pinv_extended
  u, s, vt = np.linalg.svd(X, 0)
  File "C:\Python27\lib\site-packages\numpy\linalg\linalg.py", line 1327, in svd
  u, s, vt = gufunc(a, signature=signature, extobj=extobj)
  File "C:\Python27\lib\site-packages\numpy\linalg\linalg.py", line 99, in _raise_linalgerror_svd_nonconvergence
  raise LinAlgError("SVD did not converge")
  numpy.linalg.linalg.LinAlgError: SVD did not converge
  </code></pre>
  
  <p>What's the problem? And how can I solve it?</p>
  
  <p>Thank you</p>