graph.mod | R Documentation |
x-y plot containing the simple slopes conditioned on z.
graph.mod(ssmod, x, y, data, title = "", xlab = "Centered X", ylab = "Raw Y", ylimit = 1.5, ...)
ssmod |
Results of |
x |
Explanatory variable to be used in xyplot |
y |
Outcome variable to be used in xyplot |
data |
data.frame containing x, z, y |
title |
Optional 'main' title for the plot |
xlab |
x-axis label |
ylab |
y-axis label |
ylimit |
used as a multiple of SDy to define the limits of the y-axis |
... |
to be determined ... |
Given moderate.lm
and sim.slopes
, this function plots x,y and adds the simple slopes corresponding to arbitrary values of z defined in sim.slopes
. Users must 'click' on an area to add the legend.
A plot object.
This is based on a simple 3 variable moderation model with continuous variables. Users must modify the functions to accomodate other models (e.g., categorical moderators, covariates)
Thomas D. Fletcher t.d.fletcher05@gmail.com
Aiken, L. S., & West, S. G. (1991). Multiple regression: Testing and interpreting interactions. Newbury Park: Sage Publications.
Cohen, J., Cohen, P., West, S. G., & Aiken, L. S. (2003). Applied multiple regression/correlation analysis for the behavioral sciences, 3rd ed. Mahwah, NJ: Lawrence Erlbaum Associates.
moderate.lm
, sim.slopes
data(tra) lm.mod1 <- moderate.lm(beliefs, values, attitudes, tra) ss.mod1 <- sim.slopes(lm.mod1, tra$values) ## requires user interaction ## graph.mod(ss.mod1,beliefs,attitudes,tra,"Interaction Example")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.