data_mod: Sample Dataset: One Moderator

data_modR 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), ]

manymome documentation built on Oct. 4, 2024, 5:10 p.m.