data_med {manymome} | R Documentation |
Sample Dataset: Simple Mediation
Description
A simple mediation model.
Usage
data_med
Format
A data frame with 100 rows and 5 variables:
- x
Predictor. Numeric.
- m
Mediator. Numeric.
- y
Outcome variable. Numeric.
- c1
Control variable. Numeric.
- c2
Control variable. Numeric.
Examples
library(lavaan)
data(data_med)
mod <-
"
m ~ a * x + c1 + c2
y ~ b * m + x + c1 + c2
ab := a * b
"
fit <- sem(mod, data_med, fixed.x = FALSE)
parameterEstimates(fit)
[Package manymome version 0.2.2 Index]