powered by
A simple mediation model with moderated-mediation on the b-path.
data_med_mod_b_mod
A data frame with 100 rows and 5 variables:
Predictor. Numeric.
Moderator on b-path. Numeric.
Moderator on the moderating effect of w1. Numeric.
Mediator. Numeric.
Outcome variable. Numeric.
Control variable. Numeric.
data(data_med_mod_b_mod) dat <- data_med_mod_b_mod summary(lm_m <- lm(m ~ x + c1 + c2, dat)) summary(lm_y <- lm(y ~ m*w1*w2 + x + c1 + c2, dat))
Run the code above in your browser using DataLab