data_sem_mome: Sample Dataset: A Latent Variable Moderated Mediation Model...

data_sem_momeR Documentation

Sample Dataset: A Latent Variable Moderated Mediation Model With 4 Factors

Description

This data set is for testing functions for moderated mediation among latent variables.

Usage

data_sem_mome

Format

A data frame with 500 rows and 16 variables:

x1

Indicator. Numeric.

x2

Indicator. Numeric.

x3

Indicator. Numeric.

x4

Indicator. Numeric.

w1

Indicator. Numeric.

w2

Indicator. Numeric.

w3

Indicator. Numeric.

w4

Indicator. Numeric.

m1

Indicator. Numeric.

m2

Indicator. Numeric.

m3

Indicator. Numeric.

m4

Indicator. Numeric.

y1

Indicator. Numeric.

y2

Indicator. Numeric.

y3

Indicator. Numeric.

y4

Indicator. Numeric.

Examples

data(data_sem_mome)
mod <-
"
fx =~ x1 + x2 + x3 + x4
fw =~ w1 + w2 + w3 + w4
fm =~ m1 + m2 + m3 + m4
fy =~ y1 + y2 + y3 + y4
fm ~ fx + fw + fx:fw
fy ~ fm + fx
"
library(lavaan)
fit <- sam(model = mod, data = data_sem_mome)
summary(fit)


manymome documentation built on June 2, 2026, 1:07 a.m.