Skip to content

Missing data handling for mixedlm - #3591

Merged
kshedden merged 9 commits into
statsmodels:masterfrom
kshedden:mixedlm_missing
Jul 15, 2017
Merged

kshedden merged 9 commits into
statsmodels:masterfrom
kshedden:mixedlm_missing

Conversation

@kshedden

@kshedden kshedden commented Apr 2, 2017

Copy link
Copy Markdown
Contributor

Closes #3248

@kshedden

kshedden commented Apr 2, 2017 •

Copy link
Copy Markdown
Contributor Author

Actually may not fully close #3248, I didn't look into handling Pandas categoricals. But this PR should resolve the issues with missing data handling.

@coveralls

Copy link
Copy Markdown

Coverage Status

Coverage increased (+0.02%) to 90.313% when pulling 7df8556 on kshedden:mixedlm_missing into a218660 on statsmodels:master.

@coveralls

Copy link
Copy Markdown

Coverage Status

Coverage increased (+0.02%) to 90.314% when pulling dd425ac on kshedden:mixedlm_missing into a218660 on statsmodels:master.

@coveralls

coveralls commented Apr 2, 2017 •

Copy link
Copy Markdown

Coverage Status

Coverage increased (+0.009%) to 90.305% when pulling 8a551f0 on kshedden:mixedlm_missing into a218660 on statsmodels:master.

@coveralls

coveralls commented Apr 4, 2017 •

Copy link
Copy Markdown

Coverage Status

Coverage increased (+0.009%) to 90.305% when pulling 1dd0f17 on kshedden:mixedlm_missing into a218660 on statsmodels:master.

@kshedden
kshedden force-pushed the mixedlm_missing branch from 1dd0f17 to 1cc10be Compare May 9, 2017 14:24

assert_allclose(result1.params, result2.params)
assert_allclose(result1.bse, result2.bse)

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.

maybe add some assert for fittedvalues or for some result arrays that have the nobs length

@josef-pkt

Copy link
Copy Markdown
Member

Look fine to me, but I'm not familiar enough with mixedlm and missing value handling to spot possible problems.

The renaming in the results is backwards incompatible, are they?
names in summary are mostly irrelevant because users don't get direct access to them,
but names in DataFrames would be used by users.

@coveralls

coveralls commented Jun 25, 2017 •

Copy link
Copy Markdown

Coverage Status

Coverage increased (+0.2%) to 90.547% when pulling 3e9509d on kshedden:mixedlm_missing into e0b772e on statsmodels:master.

if type(kwargs["groups"]) == str:
group_name = kwargs["groups"]
kwargs["groups"] = np.asarray(data[kwargs["groups"]])
if type(groups) == str:

@jbrockmendel jbrockmendel Jun 29, 2017 •

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.

Does bytes/unicode matter here?
Update: looks like that is in fact handled below. Never mind.

@kshedden

kshedden commented Jul 3, 2017 via email

Copy link
Copy Markdown
Contributor Author

@coveralls

coveralls commented Jul 3, 2017 •

Copy link
Copy Markdown

Coverage Status

Coverage increased (+0.6%) to 90.869% when pulling 976524f on kshedden:mixedlm_missing into e0b772e on statsmodels:master.

@coveralls

coveralls commented Jul 8, 2017 •

Copy link
Copy Markdown

Coverage Status

Coverage increased (+0.009%) to 90.869% when pulling 9ce2d72 on kshedden:mixedlm_missing into 359f08b on statsmodels:master.

@coveralls

coveralls commented Jul 9, 2017 •

Copy link
Copy Markdown

Coverage Status

Coverage increased (+0.009%) to 90.869% when pulling 4b1171c on kshedden:mixedlm_missing into 359f08b on statsmodels:master.

@coveralls

coveralls commented Jul 15, 2017 •

Copy link
Copy Markdown

Coverage Status

Coverage increased (+0.009%) to 90.878% when pulling 450ab92 on kshedden:mixedlm_missing into c542e98 on statsmodels:master.

@kshedden
kshedden deleted the mixedlm_missing branch January 25, 2018 18:59
@josef-pkt josef-pkt added this to the 0.9 milestone Apr 15, 2018
@shan3520 shan3520 mentioned this pull request Oct 7, 2026
5 of 6 tasks
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.

4 participants