-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
emtrends odd behavior with nuisance variables #448
Comments
Thanks for reporting this. Clearly there's a problem, and I'll look into it. PS --- It's a little confusing to include
|
In the meantime, it is possible to do it by manually computing the difference quotients, even with nuisance factors included:
|
Thanks for that workaround - very helpful. I'll use that in the meantime and stay tuned to see if there's an update at some point. Many thanks- |
It was a bookkeeping error. I made a fix to the code for nuisance factors so that the
|
PS you can install it from GitHub (see how on the main code page) and it should work |
Great, thanks so much! I figured it was a something small. Glad to hear it was an easy fix. I'll use the GitHub installation method and move forward. Have a great weekend. |
Describe the bug
Hi Russ - thanks for your work on this great package. I have recently been using the emmeans() function on categorical variables in a model with 50+ variables and 250K+ observations, so employing the "nuisance" argument to simplify the grid has been important to that workflow. I recently tried the same approach using the emtrends() function with a continuous variable. It works as expected when I don't include any nuisance variables, but when including them, the output doesn't make sense to me (has only one group when it should have two; has an odd trend estimate). See example below. I can't tell if I'm misunderstanding how emtrends() handles nuisance arguments, or whether it's a bug. Thanks!
Josh Nugent
Kaiser Permanente Division of Research
To reproduce
Expected behavior
I expect that the slopes should be around .25 for the "0" group and .5 for the "1" group, as they are when I exclude the nuisance argument.
The text was updated successfully, but these errors were encountered: