data_mod {manymome} | R Documentation |
Sample Dataset: One Moderator
Description
A one-moderator model.
Usage
data_mod
Format
A data frame with 100 rows and 5 variables:
- x
Predictor. Numeric.
- w
Moderator. Numeric.
- y
Outcome variable. Numeric.
- c1
Control variable. Numeric.
- c2
Control variable. Numeric.
Examples
library(lavaan)
data(data_mod)
data_mod$xw <- data_mod$x * data_mod$w
mod <-
"
y ~ a * x + w + d * xw + c1 + c2
w ~~ v_w * w
w ~ m_w * 1
a_lo := a + d * (m_w - sqrt(v_w))
a_hi := a + d * (m_w + sqrt(v_w))
"
fit <- sem(mod, data_mod, fixed.x = FALSE)
parameterEstimates(fit)[c(1, 3, 6, 7, 24, 25), ]
[Package manymome version 0.2.2 Index]