powered by
Calculates a standardized two way or three way interaction and plots using ggplot2.
int.plot(data, outcome, predictor, moderator, y.lim = c(-1, 1), x.lim = c(-1, 1), x.lab = "auto", y.lab = "auto", title = "auto", title.size = 15, SDs = 1, legend.name = "auto", colour = "ghostwhite", show.points = FALSE, save = F, path = getwd())
an object of class 'data.frame' or 'imputationList'.
a string with the name of the outcome variable.
a string with the name of the predictor variable.
a vector of the names of up to two moderating variables.
vector of numerals indicating y axis bounds.
vector of numerals indicating x axis bounds.
a string with the label of the x axis.
a string with the label of the y axis.
a string containing title text.
a numeral containing the font size of the title.
a numeral indicating the standard deviations of the moderators.
a character string indicating the title of the legend.
a character string containing the colour of the data points.
logical to determine whether or not to include points.
logical as to whether or not to save the plot.
string containing path of where to save plot. Defaults to working directory.
A ggplot
# NOT RUN { carsdata<-mtcars int.plot(carsdata,"mpg","disp","cyl", y.lim = c(-2.5,2.5)) int.plot(carsdata,"mpg","disp", c("cyl","am"), y.lim = c(-5.0,2.0)) # }
Run the code above in your browser using DataLab