strengejacke / sjPlot

sjPlot - Data Visualization for Statistics in Social Science

Home Page:https://strengejacke.github.io/sjPlot

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Plotting three-way interactions without panels?

adamroebuck opened this issue · comments

I am trying to plot a three-way interaction between time and two other standardized continuous variables (let's call them M1 and M2). Typically, I'd use something like the following:
sjPlot::plot_model(mod39, type = "pred", terms = c("Linear_Event [0:23]", "M1", "M2"), axis.title = c("Event Time", "Y"), title="Figure Title", ci.lvl = NA, legend.title = "")+ scale_color_discrete(labels = c("Low M1", "Average M1", "High M1"))

That code produces simple slopes and averages of M1 at -1, 0, and +1 SDs of M2 (recall these variables are standardized). Is there a way to, instead, have a single plot (no panels) with four lines: (1) High M1/High M2, (2) High M1/Low M2, (3) Low M1/High M2, and (4) Low M1/Low M2?

Thanks in advance for any help.