Skip to content

Allow results to be stored for multiple imputation - #5093

Merged
kshedden merged 2 commits into
statsmodels:masterfrom
kshedden:mi_results
Sep 9, 2018
Merged

kshedden merged 2 commits into
statsmodels:masterfrom
kshedden:mi_results

Conversation

@kshedden

@kshedden kshedden commented Sep 3, 2018

Copy link
Copy Markdown
Contributor

This PR allows optional storage of results generated during multiple imputation by passing each results instance through a callback function. It needs to be optional and customizable since results contains a reference to the data, and there may not be room to store all imputed data in memory at once.

This also changes the default model_args_fn behavior since the existing approach did not work with models where the data parameter does not appear in the first position of the model initializer. This is a new class from <6 months ago so minor compatibility break should be acceptable.

@coveralls

Copy link
Copy Markdown

Coverage Status

Coverage increased (+0.02%) to 83.928% when pulling 75000ee on kshedden:mi_results into 12781c2 on statsmodels:master.

@codecov

codecov Bot commented Sep 3, 2018

Copy link
Copy Markdown

Codecov Report

Merging #5093 into master will decrease coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master   #5093      +/-   ##
=========================================
- Coverage   81.41%   81.4%   -0.01%     
=========================================
  Files         582     582              
  Lines       90307   90314       +7     
  Branches    10109   10111       +2     
=========================================
- Hits        73524   73523       -1     
- Misses      14484   14490       +6     
- Partials     2299    2301       +2
Impacted Files Coverage Δ
statsmodels/imputation/bayes_mi.py 94.57% <100%> (+0.71%) ⬆️
statsmodels/imputation/tests/test_bayes_mi.py 100% <100%> (ø) ⬆️
statsmodels/regression/mixed_linear_model.py 88.97% <0%> (-0.8%) ⬇️

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 12781c2...75000ee. Read the comment docs.

@kshedden
kshedden merged commit 0e41ebd into statsmodels:master Sep 9, 2018
@josef-pkt josef-pkt added this to the 0.10 milestone Sep 15, 2018
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.

3 participants