Learn R Programming

probemod (version 0.1)

jn: Johnson-Neyman Technique

Description

Probe moderation effect using the Johnson-Neyman technique

Usage

jn(model, dv, iv, mod, alpha = 0.05)

Arguments

model
regression model (lm).
dv
dependent variable (character).
iv
independent variable (character).
mod
moderator variable(s) (character or character vector).
alpha
alpha level to use (numeric).

Value

  • A list with the elements

References

Spiller, S. A., Fitzsimons, G. J., Lynch, J. G., Jr, & McClelland, G. H. (2013). Spotlights, floodlights, and the magic number zero: Simple effects tests in moderated regression. Journal of Marketing Research, 50(2), 277-288.

Bauer, D. J., & Curran, P. J. (2005). Probing interactions in fixed and multilevel regression: Inferential and graphical techniques. Multivariate Behavioral Research, 40(3), 373-400.

Examples

Run this code
myModel <- lm('DV ~ IV + MOD', data=someData)
jnresults <- jn(myModel, dv='DV', iv='IV', mod='MOD')
jnresults <- jn(myModel, dv='DV', iv='IV', mod='MOD', alpha=.01)
plot(jnresults)

Run the code above in your browser using DataLab