title: ADF test in statsmodels in Python
body: <p>I am trying to run a Augmented Dickey-Fuller test in <code>statsmodels</code> in Python, but I seem to be missing something.</p>
  
  <p>This is the code that I am trying:</p>
  
  <pre><code>import numpy as np
  import statsmodels.tsa.stattools as ts
  
  x = np.array([1,2,3,4,3,4,2,3])
  result = ts.adfuller(x)
  </code></pre>
  
  <p>I get the following error:</p>
  
  <pre><code>Traceback (most recent call last):
    File "C:\Users\Akavall\Desktop\Python\Stats_models\stats_models_test.py", line 12, in &lt;module&gt;
      result = ts.adfuller(x)
    File "C:\Python27\lib\site-packages\statsmodels-0.4.1-py2.7-win32.egg\statsmodels\tsa\stattools.py", line 201, in adfuller
      xdall = lagmat(xdiff[:,None], maxlag, trim='both', original='in')
    File "C:\Python27\lib\site-packages\statsmodels-0.4.1-py2.7-win32.egg\statsmodels\tsa\tsatools.py", line 305, in lagmat
      raise ValueError("maxlag should be &lt; nobs")
  ValueError: maxlag should be &lt; nobs
  </code></pre>
  
  <p>My Numpy Version: 1.6.1
  My statsmodels Version: 0.4.1
  I am using windows.</p>
  
  <p>I am looking at the documentation <a href="http://statsmodels.sourceforge.net/stable/generated/statsmodels.tsa.stattools.adfuller.html#statsmodels.tsa.stattools.adfuller" rel="nofollow">here</a> but can't figure what I am doing wrong. What am I missing?</p>
  
  <p>Thanks in Advance.</p>