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

Add sim_slopes to have label functionality #35

krcarriere opened this issue Jun 19, 2018 · 4 comments


None yet
3 participants
Copy link

commented Jun 19, 2018

Following the vignette:
dstrat<-svydesign(id=~1,strata=~stype, weights=~pw, data=apistrat, fpc=~fpc)
regmodel3 <- survey::svyglm(api00 ~ avg.ed * growth * enroll, design = dstrat)
sim_slopes(regmodel3, pred = growth, modx = avg.ed, mod2 = enroll,
jnplot = TRUE, mod2.labels=c("test", "test1", "test2"))

Would be great to be able to label those as well! :) Sorry for all the issues, just trying to use your package for some visualizations for publications and want it to be clean looking!


This comment has been minimized.

Copy link

commented Jun 24, 2018

Are you thinking the labeled output should look like this?

While enroll (2nd moderator) = 1037.51 (test2)

instead of

While enroll (2nd moderator) = 1037.51 (+ 1 SD)


This comment has been minimized.

Copy link

commented Jun 24, 2018


This comment has been minimized.

Copy link

commented Jun 26, 2018

Ahh. I realize what I asked wasn't clear.

I'm trying to figure out how to get additional commands onto the jnplot=TRUE command part. So, when it's plotted, being able to edit the plot itself. (Changing "Slope of growth" to "Slope of Growth", "enroll = + 1 SD" to "Enrolled Above 1 SD", etc).

Which seems like something brought up in this issue:

So maybe I just need to dig into the jn objects in the sim_slopes function.


This comment has been minimized.

Copy link

commented Jul 6, 2018

I just want to add on to this that the modx.labels and mod2.labels arguments don't seem to be changing the labels at all (even with a basic lm object). There's no error, it just doesn't do anything so I'm not sure if I'm using it incorrectly. After trying it with my actual model, I tested it with this:

mod <- lm(mpg ~ hp * cyl * disp, mtcars)

interact_plot(mod, pred = "hp", modx = "cyl", modx.labels = c("Low", "Med", "High"))

I just started using this package today so please let me know if I'm just using it wrong.

@jacob-long jacob-long closed this in 686ea08 Aug 9, 2018

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.