jacob-long / jacob-long/interactions
Ability to edit labels and grid for 3-way interaction jnplot
- Dominant language
- R
- Stars
- 135
- Forks
- 19
- PR merge metrics
- No merged PRs in 30d
Description
Thank you very much for providing this very useful package! I am using sim_slopes to probe a 3-way interaction between 3 continuous variables with a Johson-Neyman plot. I was wondering if it is possible to a) change the y-axis labels on the interaction plots and b) to arrange the subplots in a single row instead of in a 2 row grid (2 subplots in upper row and 1 subplot in lower row).
For example, using this code. I would like to change the y-axis label from "Slope of Illiteracy" to "Murder - Illiteracy Association" and instead of having the "Income = + 1 SD" plot on the bottom row, I would like that to appear to the right of the "Income = Mean" plot on the top row. I have searched the github Issues and stack overflow but cannot figure out an easy fix so chancing my arm here! Thank you.
```
dat <- data.frame(state.x77)
reg.mod = lm(data=dat, Murder ~ Illiteracy * Population * Income)
state_sim_slopes <- sim_slopes(reg.mod, pred = Illiteracy, modx = Population,
mod2 = Income, jnplot = TRUE)
state_sim_slopes
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Reproduce the issue with the supplied state.x77, lm, sim_slopes, and jnplot example, then trace the plotting entry point used for the three-way interaction output. Done means users can set the y-axis label and arrange all three subplots in one row, with the example behavior verified.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- r
- Domain
- data-visualization
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100