data_parallel {manymome} | R Documentation |
Sample Dataset: Parallel Mediation
Description
A parallel mediation model.
Usage
data_parallel
Format
A data frame with 100 rows and 6 variables:
- x
Predictor. Numeric.
- m1
Mediator 1. Numeric.
- m2
Mediator 2. Numeric.
- y
Outcome variable. Numeric.
- c1
Control variable. Numeric.
- c2
Control variable. Numeric.
Examples
library(lavaan)
data(data_parallel)
mod <-
"
m1 ~ a1 * x + c1 + c2
m2 ~ a2 * x + c1 + c2
y ~ b2 * m2 + b1 * m1 + x + c1 + c2
indirect1 := a1 * b1
indirect2 := a2 * b2
indirect := a1 * b1 + a2 * b2
"
fit <- sem(mod, data_parallel,
meanstructure = TRUE, fixed.x = FALSE)
parameterEstimates(fit)[c(1, 4, 7, 8, 27:29), ]
[Package manymome version 0.2.2 Index]