jacob-long / jacob-long/interactions
ymin and ymax are of different distance from the mean in cat_plot when used with glm.nb
- Dominant language
- R
- Stars
- 135
- Forks
- 19
- PR merge metrics
- No merged PRs in 30d
Description
Hi,
First thanks for the great package!
I tried to use cat_plot with a glm.nb model that has two categorical variables and their interactions (y ~ A*B). Surprisingly, the mean does not sit in the middle between the ymin and ymax. For example, for group A1B1, the mean is 14.4, ymax is 17.5 and ymin is 11.9.
Using the same variables in a regular (non nb) glm returned normal results (the mean was in the middle).
I assume this is an error, as I can't think of a reason that the positive and negative CI (these are CI right?) will be different.
Thanks in advance.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start at the cat_plot entry point and reproduce the reported case with glm.nb, two categorical variables, and the y ~ A*B formula. Compare its ymin and ymax with the corresponding regular glm output, then determine whether the asymmetric intervals are expected confidence intervals or a calculation bug; done means the behavior is clarified and, if erroneous, covered by a regression test.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- r
- Domain
- data-visualization
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100