Repository navigation
Conversation
This was referenced Nov 23, 2026
bashtage
force-pushed
the
wip-mlemodel-news-univariate-exog
branch
6 times, most recently
from
November 27, 2026 23:39
51b78d2 to
a6eac97
Compare
statsmodels#11273 made MLEResults.news accept a comparison dataset shorter than exog for a univariate model. Add a test for the cases its test does not cover: a VAR(1) with exog besides the regression with AR(1) errors, the total impact compared with its closed form, and the news compared with the news from results for the dataset extended by hand. Tests - For a regression with AR(1) errors and a VAR(1) with exog, the total impact of observing y_10 on the forecast of y_11 equals the closed form (phi (u_10 - phi u_9) and A (y_10 - A y_9 - B x_10)), the columns are the endog names, and the news equals the news from results for the dataset extended by hand with missing values.
bashtage
force-pushed
the
wip-mlemodel-news-univariate-exog
branch
from
November 28, 2026 22:06
a6eac97 to
3dbcd9b
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Test-only follow-up to #11273, which fixed
MLEResults.newsfor aunivariate model whose
comparisondataset is shorter thanexog. This PRfirst carried the same fix; it is now rebased onto main with #11273's fix
and keeps only its test, which covers cases #11273's test does not.
Tests
test_news_dataset_with_longer_exog, for a regression with AR(1) errorsand for a VAR(1) with exog: the total impact of observing y_10 on the
forecast of y_11 equals the closed form (phi (u_10 - phi u_9) and
A (y_10 - A y_9 - B x_10)), the columns are the endog names, and the news
equals the news from results for the dataset extended by hand with
missing values.
case raises the original TypeError.
#11055, #11058, #11060 and the #11063 stack also append tests to
test_mlemodel.py: whichever merges later keeps every appended block.NumPy's guide.
AI Disclosure
Contributions must comply with the statsmodels AI Policy.
Tick exactly one of the following. If AI tools were used, replace the
<...>placeholders in the second option with the tool name(s) and how the tool's output was
used.
Tool(s): Claude Code (Claude Opus 5.5).
Used for: writing the test and checking it (closed forms, and a mutation check against the fix in BUG: Accept a dataset in news for a univariate model with longer exog #11273).
I have personally read, understood, and can explain every line of this diff, and
have verified the statistical/numerical correctness of the change.
🤖 Generated with Claude Code