Comments (3)
I just ran into the same problem. Here is a reprex using iris
pacman::p_load(tidyverse, interactions)
myData <- iris %>%
mutate(Species = factor(Species, ordered = TRUE, levels = c("setosa", "versicolor", "virginica")))
mod <- lm(Sepal.Length ~ Petal.Width*Species, data = myData)
interactions::sim_slopes(mod, pred = Petal.Width, modx = Species, jnplot = TRUE)
You are a more skilled coder than I am...I was not able to follow the 2nd and 3rd lines but running
myData$Species <- factor(myData$Species, ordered=F)
This was the temporary fix I was seeking. But will still cause an error
Warning message:
Johnson-Neyman intervals are not available for factor moderators.
from interactions.
The reason I didn't use your fix is that I needed the factor to be ordered in the model. If the order doesn't matter, your fix works fine.
ALso, setting the argument johnson_neyman = F
in the sim_slopes() function will remove the error.
from interactions.
Thank you for reporting this!
from interactions.
Related Issues (20)
- cannot change axis labels in sim_slopes HOT 2
- Create confidence interval around johnson-neyman point HOT 1
- mod2.labels issue HOT 1
- Interaction lines on top of data points
- Change Facet Labels in Mod2 HOT 1
- interact_plot with 3-way interaction error: contrasts can be applied only to factors with 2 or more levels HOT 1
- ymin and ymax are of different distance from the mean in cat_plot when used with glm.nb
- sim_slopes error HOT 1
- guidance on extensions
- Cat_plot converts numeric predictor variable to categorical without warning
- Corrigendum HOT 1
- Difference between "significant' and "not significant" is not itself statistically significant HOT 2
- point.shape not working in interact_plot()
- Change Legend Text
- Changing the x.label in Johnson Neyman plot using sim_slopes
- rlang strangeness with sim_slopes HOT 3
- latent interaction
- Change Confidence Interval in interact_plot HOT 1
- Issue with inclusion of "weights" HOT 5
- Ability to edit labels and grid for 3-way interaction jnplot
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from interactions.