data_med_mod_a {manymome} | R Documentation |
Sample Dataset: Simple Mediation with a-Path Moderated
Description
A simple mediation model with a-path moderated.
Usage
data_med_mod_a
Format
A data frame with 100 rows and 6 variables:
- x
Predictor. Numeric.
- w
Moderator. Numeric.
- m
Mediator. Numeric.
- y
Outcome variable. Numeric.
- c1
Control variable. Numeric.
- c2
Control variable. Numeric.
Examples
library(lavaan)
data(data_med_mod_a)
data_med_mod_a$xw <-
data_med_mod_a$x *
data_med_mod_a$w
mod <-
"
m ~ a * x + w + d * xw + c1 + c2
y ~ b * m + x + w + c1 + c2
w ~~ v_w * w
w ~ m_w * 1
ab := a * b
ab_lo := (a + d * (m_w - sqrt(v_w))) * b
ab_hi := (a + d * (m_w + sqrt(v_w))) * b
"
fit <- sem(mod, data_med_mod_a,
meanstructure = TRUE, fixed.x = FALSE)
parameterEstimates(fit)[c(1, 3, 6, 11, 12, 31:33), ]
[Package manymome version 0.2.2 Index]