Skip to content

ENH: Add rolling WLS and OLS - #6028

Merged
bashtage merged 1 commit into
statsmodels:masterfrom
bashtage:rolling-ls
Aug 3, 2019
Merged

bashtage merged 1 commit into
statsmodels:masterfrom
bashtage:rolling-ls

Conversation

@bashtage

Copy link
Copy Markdown
Member

Provide a rolling estimator similar in spirit to the old pandas version

closes #2745
closes #2302

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 master 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/master -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.

@pep8speaks

pep8speaks commented Jul 28, 2019 •

Copy link
Copy Markdown

Hello @bashtage! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻

Comment last updated at 2019-08-02 21:58:16 UTC

@bashtage

bashtage commented Jul 28, 2019 •

Copy link
Copy Markdown
Member Author

Small number of todo:

  • Formula in notebook
  • Complete test coverage of edge cases

@codecov

codecov Bot commented Jul 29, 2019 •

Copy link
Copy Markdown

Codecov Report

Merging #6028 into master will increase coverage by 0.09%.
The diff coverage is 96.82%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #6028      +/-   ##
==========================================
+ Coverage   83.55%   83.65%   +0.09%     
==========================================
  Files         607      609       +2     
  Lines       96409    97038     +629     
  Branches    10473    10544      +71     
==========================================
+ Hits        80559    81174     +615     
- Misses      13473    13475       +2     
- Partials     2377     2389      +12
Impacted Files Coverage Δ
statsmodels/regression/tests/test_rolling.py 100% <100%> (ø)
statsmodels/regression/rolling.py 95.18% <95.18%> (ø)
statsmodels/sandbox/distributions/mv_normal.py 38.82% <0%> (ø) ⬆️
statsmodels/sandbox/regression/treewalkerclass.py 0% <0%> (ø) ⬆️
statsmodels/sandbox/stats/multicomp.py 46.93% <0%> (ø) ⬆️
statsmodels/stats/libqsturng/make_tbls.py 0% <0%> (ø) ⬆️
statsmodels/tsa/statespace/mlemodel.py 86.33% <0%> (ø) ⬆️
statsmodels/iolib/summary.py 58.15% <0%> (ø) ⬆️
... and 4 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c297cef...82377ac. Read the comment docs.

@coveralls

coveralls commented Jul 29, 2019 •

Copy link
Copy Markdown

Coverage Status

Coverage increased (+0.08%) to 86.113% when pulling 82377ac on bashtage:rolling-ls into c297cef on statsmodels:master.

@bashtage
bashtage force-pushed the rolling-ls branch 4 times, most recently from 3164b29 to dcad05b Compare July 30, 2019 13:58
Comment thread statsmodels/base/model.py
@@ -2130,7 +2127,7 @@ def load(cls, fname):
Parameters
----------
fname : {str, handle}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

i think the braces pattern is supposed to be only for literals

@jbrockmendel

Copy link
Copy Markdown
Contributor

haven't yet looked at the rolling module itself. it would be easier if you split off the non-rollling parts of the PR, which generally look good

@bashtage
bashtage force-pushed the rolling-ls branch 3 times, most recently from 3b32961 to 592e64b Compare August 2, 2019 16:12
@bashtage

bashtage commented Aug 2, 2019

Copy link
Copy Markdown
Member Author

haven't yet looked at the rolling module itself. it would be easier if you split off the non-rollling parts of the PR, which generally look good

I split it. This PR is rolling only now.

Provide a rolling estimator similar in spirit to the old pandas version

closes statsmodels#2745
closes statsmodels#2302
@bashtage
bashtage merged commit b75f677 into statsmodels:master Aug 3, 2019
@bashtage
bashtage deleted the rolling-ls branch August 3, 2019 08:33
@bashtage bashtage added this to the 0.11 milestone Dec 18, 2019
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.

SUMM/ENH: migrate pandas stats models ENH: Migrate pandas MovingOLS

4 participants