Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

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

….5-3.2)
  • Loading branch information...
commit e8c477bd0346f6332338c412f5bc338188645297 1 parent 9b918d7
@josef-pkt josef-pkt authored
View
2  statsmodels/sandbox/stats/diagnostic.py
@@ -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)
View
2  statsmodels/tsa/stattools.py
@@ -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')
View
2  statsmodels/tsa/tests/test_adfuller_lag.py
@@ -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
Please sign in to comment.
Something went wrong with that request. Please try again.