Graphing Johnson-Neyman plots in Jamovi
Posted: Sat Mar 16, 2024 1:37 am
Hi -
I am teaching moderation using Jamovi. I attempted to create Johnson Neyman plots (code below) using the Rj module but get the error "trying to use CRAN without setting a mirror." What am I doing wrong?
Thanks!
Sara
#install and load necessary packages
install.packages("jtools")
library(jtools)
#fit your regression model
model <- lm(dependent_variable ~ predictor_variable + moderator_variable, data = your_data)
#create Johnson-Neyman plot
plot_jn(model, pred = "moderator_variable", modx = "predictor_variable")
I am teaching moderation using Jamovi. I attempted to create Johnson Neyman plots (code below) using the Rj module but get the error "trying to use CRAN without setting a mirror." What am I doing wrong?
Thanks!
Sara
#install and load necessary packages
install.packages("jtools")
library(jtools)
#fit your regression model
model <- lm(dependent_variable ~ predictor_variable + moderator_variable, data = your_data)
#create Johnson-Neyman plot
plot_jn(model, pred = "moderator_variable", modx = "predictor_variable")