-
Notifications
You must be signed in to change notification settings - Fork 92
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
Discrepancy between plot_model output and estimate from lmer summary #424 #934
Comments
I think the confusion here just stems from what the estimates in the regression table mean. This can get sort of tricky, which is why I always tell students to visualize model predictions with something like This is what the four lines of the fixed effects are telling you: (Intercept) - The predicted value of Period - The difference in Count_RSSI_GE_Minus50 - The estimated slope of this variable when Period:Count_RSSI_GE_Minus50 - Interactions can always be thought of in two reversible ways, so this is both how the effect of So, to get the slope of
Then to get the slope when
The following code tests some values to make predictions manually, and it looks like everything checks out:
Also, I think you may want to fit Period as a random slope instead of the structure you currently have. Something like this may be more appropriate, although I would definitely check with someone in your field who has domain knowledge who is comfortable with using mixed models
|
By default,
Furthermore, if you're interested in predictions, I suggest using the ggeffects package directly. The situation with mixed models is slightly more complicated, because you can condition on random effects or not. There's also a vignette here. |
Hello all.
I am running a mixed linear models, but I have been using the plot_model to generate the regression model graph
When I run linear mixed effect model (lmer function) the out put doesn't match with the intercept and slope for the 2 periods.Which function does plot_model use to generate the graph? Can you get the equation fro plot_model?
My equations from my R output
This is the graph that I get from plot_model
Can someone please give me a hand with that?
The text was updated successfully, but these errors were encountered: