Skip to content

BUG: Dickey Fuller constant values (issue #8471 ) - #8537

Merged
josef-pkt merged 1 commit into
statsmodels:mainfrom
athompson1991:issue-8471-dickey-fuller-fix
Dec 7, 2022
Merged

josef-pkt merged 1 commit into
statsmodels:mainfrom
athompson1991:issue-8471-dickey-fuller-fix

Conversation

@athompson1991

Copy link
Copy Markdown
Contributor
Details

Notes:

  • It is essential that you add a test when making code changes. Tests are not
    needed for doc changes.
  • When adding a new function, test values should usually be verified in another package (e.g., R/SAS/Stata).
  • When fixing a bug, you must add a test that would produce the bug in main and
    then show that it is fixed with the new code.
  • New code additions must be well formatted. Changes should pass flake8. If on Linux or OSX, you can
    verify you changes are well formatted by running
    git diff upstream/main -u -- "*.py" | flake8 --diff --isolated
    
    assuming flake8 is installed. This command is also available on Windows
    using the Windows System for Linux once flake8 is installed in the
    local Linux environment. While passing this test is not required, it is good practice and it help
    improve code quality in statsmodels.
  • Docstring additions must render correctly, including escapes and LaTeX.

Comment thread statsmodels/tsa/stattools.py Outdated
regresults = bool_like(regresults, "regresults")

if x.max() == x.min():
raise ValueError("Invalid input, residual variance is zero")

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this should have a more specific message, e.g.
ValueError("Invalid data, x is constant")

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, just updated that message to report "x is constant"

@josef-pkt josef-pkt added this to the 0.14 milestone Dec 6, 2022
@josef-pkt

Copy link
Copy Markdown
Member

can you rebase and squash this, then I will merge it.

otherwise, I can do the squashing

@josef-pkt josef-pkt mentioned this pull request Dec 6, 2022
16 of 20 tasks
@athompson1991
athompson1991 force-pushed the issue-8471-dickey-fuller-fix branch from f00281d to 0ec9e31 Compare December 7, 2022 02:00
@athompson1991

Copy link
Copy Markdown
Contributor Author

I think I squashed this successfully, let me know if the pull request is looking right to you. First time trying to do this so my local git operations were a bit tricky and I'm not sure it's all as expected.

@josef-pkt

Copy link
Copy Markdown
Member

squashed correctly but not rebased on current main, but that's not a problem in this case

merging

Thanks for the PR

@josef-pkt
josef-pkt merged commit 2240657 into statsmodels:main Dec 7, 2022
@athompson1991
athompson1991 deleted the issue-8471-dickey-fuller-fix branch December 7, 2022 21:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

DIckey Fuller test breaks on constant values

2 participants