Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged

Conversation

athompson1991
Copy link
Contributor

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.

@@ -268,6 +268,9 @@ def adfuller(
store = bool_like(store, "store")
regresults = bool_like(regresults, "regresults")

if x.max() == x.min():
raise ValueError("Invalid input, residual variance is zero")
Copy link
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
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
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
20 tasks
@athompson1991
Copy link
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
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