Skip to content

Commit

Permalink
Merge pull request #1344 from jseabold/arma-missing-kw
Browse files Browse the repository at this point in the history
BUG: Use missing keyword given to ARMA.
  • Loading branch information
jseabold committed Jan 29, 2014
2 parents 4f442c5 + 0723170 commit 48c3376
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion statsmodels/tsa/arima_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ class ARMA(tsbase.TimeSeriesModel):

def __init__(self, endog, order=None, exog=None, dates=None, freq=None,
missing='none'):
super(ARMA, self).__init__(endog, exog, dates, freq)
super(ARMA, self).__init__(endog, exog, dates, freq, missing=missing)
exog = self.data.exog # get it after it's gone through processing
if order is None:
import warnings
Expand Down
7 changes: 7 additions & 0 deletions statsmodels/tsa/tests/test_arima.py
Original file line number Diff line number Diff line change
Expand Up @@ -1909,6 +1909,13 @@ def test_arima_dates_startatend():
fc = res.forecast()[0]
assert_almost_equal(pred.values[0], fc)

def test_arma_missing():
from statsmodels.base.data import MissingDataError
# bug 1343
y = np.random.random(40)
y[-1] = np.nan
assert_raises(MissingDataError, ARMA, y, (1, 0), missing='raise')

if __name__ == "__main__":
import nose
nose.runmodule(argv=[__file__, '-vvs', '-x', '--pdb'], exit=False)

0 comments on commit 48c3376

Please sign in to comment.