Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upSubgroup analysis on a factor with levels identical to feature levels produces wrong estimates #22
Comments
leeper
added
bug
help wanted
labels
Mar 15, 2019
This comment has been minimized.
This comment has been minimized.
This can probably be solved by specifying left-hand-side assignments that use the feature name and the level name rather than just the level name (which have been incorrectly assumed to be unique): https://github.com/leeper/cregg/blob/master/R/mm_diffs.R#L51-L90 |
leeper
closed this
in
e79b0aa
Apr 7, 2019
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
leeper commentedMar 15, 2019
•
edited
Moved from @m-jankowski at #13:
This is also a problem when using mm_diffs().
In my case, I wanted to conduct a subgroup analysis conditional on the gender of the respondents (labeled as "Male" or "Female"). The conjoint experiment, however, also contained levels with these labels ("Male" and "Female"). Particularly problematic is that mm_diffs() did not throw an error message, but returned wrong estimates without any warnings.
Here is an artificial example using the immigration data: