jacob-long / jacob-long/interactions

Changing the x.label in Johnson Neyman plot using sim_slopes

Open
#70 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
R
Stars
135
Forks
19
PR merge metrics
No merged PRs in 30d

Description

Hi there,

Firstly, thank you very much for such a helpful package.

I was wondering whether there is a way to change the x axis label in a Johnson Neyman plot using sim_slopes? When I use the following code, a JN plot is generated, but the x axis label is still the name of the moderator variable from my dataset, rather than what I have specified as a relabel:

E.g. The following example code generate JN plots, but without label changes:

sim_slopes(ModelA, pred = predictorA, modx = modA, johnson_neyman = TRUE, modx.labels= "Moderator A", jnplot = TRUE)

OR

sim_slopes(ModelA, pred = predictorA, modx = modA, johnson_neyman = TRUE, x.label= "Moderator A", jnplot = TRUE)

Thank you!

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by tracing sim_slopes with johnson_neyman and jnplot enabled, then inspect how modx.labels and x.label are handled for the Johnson-Neyman plot. Confirm the change when the plot uses the requested x-axis label while the provided example still generates the plot.

Written by the indexing model from the issue text.

Assessment

Tech stack
r
Domain
data-visualization
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.