Skip to content
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

Plotting three-way interactions without panels? #932

Open
adamroebuck opened this issue Mar 22, 2024 · 0 comments
Open

Plotting three-way interactions without panels? #932

adamroebuck opened this issue Mar 22, 2024 · 0 comments

Comments

@adamroebuck
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant