1 Time instead of Time4
I calculated a Multilevel Model and included (among other IVs), time4
as time^4
. Now, I would like to plot the effect of time on my DV. However, I would like to include the variable “time” which was not included in the model. Basically, I only need to change the axis labels…
The resulting graph should look like this one:
plot_model(rq1_model2, type = "pred", show.values = TRUE)
I only want to include the fixed effects and keep the model simple.
How do I do that?
2 Adding a second graph to the plot
Additionally, I would like to include a second similar model in the same window / plot for comparison. This second graph should only be depicted for values of time from 0 onwards (there are negative values for time for the first value).
Actually, the model only contains values for the time4-values referring to values of time from 0 onwards.
Thank you for any ideas in advance!
3 What I already tried
plot_model(rq1_model2, type = "pred", show.values = TRUE)
But I don’t know how to include data from a data frame additional to the model.
I also tried including the variable time with “^4” instead of time4 (where I calculated the variable before). However, the result is not right.
My model:
rq1_model2 <- lmerTest::lmer(proc_learn ~ ... + time4 + (1| code),
data = data, REML = FALSE)
Another option would be to only include data from a data frame. But then I would still need to get the regression results and insert the variable time. I could see exporting the regression results into a data frame and adding the variable time. However, I don’t know how to get to the regression graph.
Manuel Böhm is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
1