Repository navigation
BUG: Pad partial quarters in DynamicFactorMQ append and extend - #11213
Open
xihaian251 wants to merge 2 commits into
Open
xihaian251 wants to merge 2 commits into
xihaian251 wants to merge 2 commits into
Conversation
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.
Closes #7452.
Combining monthly and quarterly observations can leave gaps in the monthly index when the monthly update covers only part of a quarter. Reindex the combined data to a complete monthly PeriodIndex, preserving existing observations and quarter-end placement and representing intervening missing months with NaN. This avoids the need for manual padding before
appendorextend.The regression tests compare the automatic padding against explicit padding for both PeriodIndex and DatetimeIndex inputs. On the latest validated baseline, DynamicFactorMQ and DynamicFactor tests yielded 276 passed and 1 skipped, selected MLEModel append/extend tests yielded 9 passed, and TSA index tests yielded 328 passed.
NumPy's guide.
AI Disclosure<!--
REQUIRED. Do not delete or rewrite this section. The "AI Policy Disclosure Check"
CI job fails until exactly one of the two boxes below is ticked ([x]).
This applies to every pull request, including pull requests opened by an AI agent,
opened with
gh pr create --body ...(which does not use this template), or whereyou replace the text above with your own description. In those cases, copy this whole
section, unchanged, into your description.
Keep this in sync with the copy in .github/workflows/ai-policy-check.yml.
-->
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):
Qoder, ChatGPT.Used for:
Qoder (source investigation, implementation, regression tests, coverage and compatibility checks); ChatGPT (technical review and preparation of private review notes).I have personally read, understood, and can explain every line of this diff, and
have verified the statistical/numerical correctness of the change.
Details
Notes:
needed for doc changes.
then show that it is fixed with the new code.
verify your changes are well formatted by running
ruffis installed. While passing this test is not required, it is good practice and it helpimprove code quality in
statsmodels.AI Policy for what disclosure
and review is expected of you before submitting.