Skip to content

BUG: Show the components of unnamed UnobservedComponents trends in summary - #11121

Draft
bashtage wants to merge 2 commits into
statsmodels:mainfrom
bashtage:wip-uc-summary-model-name
Draft

bashtage wants to merge 2 commits into
statsmodels:mainfrom
bashtage:wip-uc-summary-model-name

Conversation

@bashtage

@bashtage bashtage commented Nov 23, 2026 •

Copy link
Copy Markdown
Member

#11086 and #11083, which this PR was stacked on, are merged. #11086 names the fixed slope combination; this PR handles the two combinations that have no name. No conflict in structural.py with #11085 or #11087-#11089; test_structural.py conflicts with #11087 and #11089 only where both append tests at the end of the file (as #11086 does): keep both blocks.

BUG: Show the components of unnamed UnobservedComponents trends in summary

The summary of UnobservedComponents results names the model by the trend
specification (trend_specification), followed by the other components.
trend_specification is None for the two combinations of level and trend
components without a name: no level or trend component (trend mask 0, for
example autoregressive=1 only, a stochastic seasonal or a stochastic
cycle only), and a stochastic level and a stochastic trend without an
irregular component (trend mask 30). The summary then showed
"Model: None", followed by "+ AR(1)" (or the other components).

Changes

  • Without a level or trend component, the model name lists the other
    components only ("Model: AR(1)").
  • A stochastic level and a stochastic trend without an irregular
    component are shown as "stochastic level" and "+ stochastic trend", in
    the style of the other components ("stochastic seasonal(4)"), followed
    by the other components.

Not changed

  • The summary of every named trend specification, and trend_specification
    (still None for these combinations, so that clone and pickling pass the
    boolean components).

Tests

  • For autoregressive=1, a stochastic seasonal, a damped stochastic cycle
    (mask 0), and a stochastic level and trend without and with a seasonal
    (mask 30), the model rows of the summary list the components; all five
    fail on the base with "None".

  • Each of the twelve named trend specifications, with an AR(1), is shown
    by its name followed by "+ AR(1)" (unchanged).

  • tests added / passed.

  • code/documentation is well formatted.

  • properly formatted commit message. See
    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.

  • No AI tools were used to develop this pull request.
  • AI tools were used.
    Tool(s): Claude Code (Claude Opus 5.5).
    Used for: finding the bug in a coverage audit of the state space models, writing the fix and its tests, and checking them (tests failing on the base, mutation check).
    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

…mmary

The summary of UnobservedComponents results names the model by the trend
specification (trend_specification), followed by the other components.
trend_specification is None for the two combinations of level and trend
components without a name: no level or trend component (trend mask 0, for
example autoregressive=1 only, a stochastic seasonal or a stochastic
cycle only), and a stochastic level and a stochastic trend without an
irregular component (trend mask 30). The summary then showed
"Model: None", followed by "+ AR(1)" (or the other components).

Changes
- Without a level or trend component, the model name lists the other
  components only ("Model: AR(1)").
- A stochastic level and a stochastic trend without an irregular
  component are shown as "stochastic level" and "+ stochastic trend", in
  the style of the other components ("stochastic seasonal(4)"), followed
  by the other components.

Not changed
- The summary of every named trend specification, and trend_specification
  (still None for these combinations, so that clone and pickling pass the
  boolean components).

Tests
- For autoregressive=1, a stochastic seasonal, a damped stochastic cycle
  (mask 0), and a stochastic level and trend without and with a seasonal
  (mask 30), the model rows of the summary list the components; all five
  fail on the base with "None".
- Each of the twelve named trend specifications, with an AR(1), is shown
  by its name followed by "+ AR(1)" (unchanged).
@bashtage
bashtage force-pushed the wip-uc-summary-model-name branch from a3e838e to bf1db76 Compare November 28, 2026 22:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant