Moderation Graph

Description

x-y plot containing the simple slopes conditioned on z.

Usage

1
graph.mod(ssmod, x, y, data, title = "", xlab = "Centered X", ylab = "Raw Y", ylimit = 1.5, ...)

Arguments

ssmod

Results of sim.slopes; Simple Slopes to be graphed

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 ...

Details

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.

Value

A plot object.

Warning

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)

Author(s)

Thomas D. Fletcher tom.fletcher.mp7e@statefarm.com

References

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.

See Also

moderate.lm, sim.slopes

Examples

1
2
3
4
5
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")