Repository navigation
Missing data handling for mixedlm - #3591
Merged
Merged
Conversation
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. |
josef-pkt
reviewed
May 13, 2017
|
|
||
| assert_allclose(result1.params, result2.params) | ||
| assert_allclose(result1.bse, result2.bse) | ||
|
|
Member
There was a problem hiding this comment.
maybe add some assert for fittedvalues or for some result arrays that have the nobs length
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? |
| if type(kwargs["groups"]) == str: | ||
| group_name = kwargs["groups"] | ||
| kwargs["groups"] = np.asarray(data[kwargs["groups"]]) | ||
| if type(groups) == str: |
Contributor
There was a problem hiding this comment.
Does bytes/unicode matter here?
Update: looks like that is in fact handled below. Never mind.
Contributor
Author
|
Thanks, I think I have fixed this now.
…On Thu, Jun 29, 2017 at 3:06 PM, jbrockmendel ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In statsmodels/regression/mixed_linear_model.py
<#3591 (comment)>
:
>
# If `groups` is a variable name, retrieve the data for the
# groups variable.
group_name = "Group"
- if type(kwargs["groups"]) == str:
- group_name = kwargs["groups"]
- kwargs["groups"] = np.asarray(data[kwargs["groups"]])
+ if type(groups) == str:
Does bytes/unicode matter here?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#3591 (review)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ACiww7oA0-DHJe48mz4XhuWduZURNahMks5sI_XLgaJpZM4Mw0EC>
.
|
kshedden
force-pushed
the
mixedlm_missing
branch
from
July 15, 2017 12:53
4b1171c to
450ab92
Compare
5 of 6 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #3248