Permalink
Browse files

BUG: fix bug from PR #316, (wasn't tested after rebase, now clean py2…

….5-3.2)
  • Loading branch information...
josef-pkt committed Jun 18, 2012
1 parent 9b918d7 commit e8c477bd0346f6332338c412f5bc338188645297
@@ -350,7 +350,7 @@ def acorr_lm(x, maxlag=None, autolag='AIC', store=False, regresults=False):
nobs = x.shape[0]
if maxlag is None:
#for adf from Greene referencing Schwert 1989
- maxlag = int(ceil(12. * np.power(nobs/100., 1/4.)))#nobs//4 #TODO: check default, or do AIC/BIC
+ maxlag = int(np.ceil(12. * np.power(nobs/100., 1/4.)))#nobs//4 #TODO: check default, or do AIC/BIC
xdiff = np.diff(x)
@@ -195,7 +195,7 @@ def adfuller(x, maxlag=None, regression="c", autolag='AIC',
if maxlag is None:
#from Greene referencing Schwert 1989
- maxlag = int(ceil(12. * np.power(nobs/100., 1/4.)))
+ maxlag = int(np.ceil(12. * np.power(nobs/100., 1/4.)))
xdiff = np.diff(x)
xdall = lagmat(xdiff[:,None], maxlag, trim='both', original='in')
@@ -25,7 +25,7 @@ def test_adf_autolag():
regression=tr, store=True, regresults=True)
st2 = adf3[-1]
- assert_equal(len(st2.autolag_results), 14 + 1) #+1 for lagged level
+ assert_equal(len(st2.autolag_results), 15 + 1) #+1 for lagged level
for l, res in sorted(st2.autolag_results.iteritems())[:5]:
lag = l-k_trend
#assert correct design matrices in _autolag

0 comments on commit e8c477b

Please sign in to comment.