Skip to content

Commit

Permalink
Merge pull request #5681 from bashtage/arima-full-output-optional
Browse files Browse the repository at this point in the history
BUG: Always set mle_retvals
  • Loading branch information
bashtage committed May 10, 2019
2 parents c73dcb8 + b6c6018 commit 8ec8124
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion statsmodels/base/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -498,8 +498,8 @@ def hess(params, *args):
mlefit = LikelihoodModelResults(self, xopt, Hinv, scale=1., **kwds)

# TODO: hardcode scale?
mlefit.mle_retvals = retvals
if isinstance(retvals, dict):
mlefit.mle_retvals = retvals
if warn_convergence and not retvals['converged']:
from warnings import warn
from statsmodels.tools.sm_exceptions import ConvergenceWarning
Expand Down
8 changes: 8 additions & 0 deletions statsmodels/tsa/tests/test_arima.py
Original file line number Diff line number Diff line change
Expand Up @@ -2450,3 +2450,11 @@ def test_multidim_endog(reset_randomstate):
y = np.random.randn(1000, 1, 1)
with pytest.raises(ValueError):
ARMA(y, order=(1, 1))


def test_arima_no_full_output():
# GH 2752
endog = y_arma[:, 6]
mod = ARIMA(endog, (1, 0, 1))
res = mod.fit(trend="c", disp=-1, full_output=False)
assert res.mle_retvals is None

0 comments on commit 8ec8124

Please sign in to comment.