-
Notifications
You must be signed in to change notification settings - Fork 1
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
Covariates and slopes #114
Comments
Short answer, the slopes are correct. Long answer, currently in the function to draw the plots, the average curve is "independent" As you can see, it does not account for any covariates that could have been included. For the figure to have curve and slopes to match, we would need to generalise that formula to include covariates effects. If you feel you can make a PR, please do! 😉 |
Thanks very much! I thought about how the "predicted periods" in I didn't use the
Thanks! |
As done internally, it uses
We don't keep covariates effects in the results, thus, I don't see how from the slopes and predicted values we can put them back. Note that this is only a visualisation issue. |
I could try to extract covariates effects and add them to the equation, to ensure the visualisation accounts for those, but I'll have to think about how to do that in a general way (interaction terms, etc.). |
Sorry for lack of reply!, I'm out of action for the next two days but will pick this up on Friday :) |
No worries, I will be off as well (theoretically). |
Hi!
I'm having trouble marrying up the slopes to the average curve. The lines from one predicted period to another don't fall along the curve as expected.
The data for the predicted periods and the model fit are the same. I ended up playing with the prediction for the curve by setting my covariate to 0 (my covariate is coded 1/2) and the slopes matched much more closely:
Am I being paranoid here, doesn't the predicted periods used for deriving the slopes include covariates in the predictions? I know we specify "filter" in
run_eggla_lmm()
but I'm having trouble seeing how this is incorporated into predicting the slopes?Thanks!
The text was updated successfully, but these errors were encountered: