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

Rename Facets in 3 Way Interactions #31

Closed
krcarriere opened this issue May 21, 2018 · 4 comments

Comments

Projects
None yet
2 participants
@krcarriere
Copy link

commented May 21, 2018

Is there a way to rename the facets of interact_plot?

data <- mtcars
model3<- lm(data=data, mpg ~ wt * hp * drat)
jtools::interact_plot(model3, pred = "wt",
modx = "hp", mod2="drat", jnplot="true",
x.label="X Label", y.label="Y Label",
legend.main="Legend Title")

It's kind of clunky to have it say "Mean of drat - 1 SD" "Mean of drat" "Mean of drat + 1 SD"
example

Also - at least for me, trying to add : mod2.labels=c("Test1", "Test2", "Test3") doesn't help.

@jacob-long

This comment has been minimized.

Copy link
Owner

commented May 28, 2018

This is a bug. I think using mod2.labels without also specifying mod2vals causes mod2.labels to be ignored. I should be able to fix this shortly.

@krcarriere

This comment has been minimized.

Copy link
Author

commented Jun 7, 2018

Perhaps, but even with specifying mod2vals:

jtools::interact_plot(model3, pred = "wt",
modx = "hp", mod2="drat", jnplot="true",
x.label="X Label", y.label="Y Label",
legend.main="Legend Title", mod2vals = "terciles", mod2.labels = c("test1","test2", "test3"))

Still doesn't change anything.

@jacob-long

This comment has been minimized.

Copy link
Owner

commented Jun 8, 2018

I should have been clearer about what I meant. The bug is that when using one of the presets (like "terciles"), the mod2.labels argument is ignored.

@krcarriere

This comment has been minimized.

Copy link
Author

commented Jun 14, 2018

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.