simple_med_mg: Dataset (Simple Mediation Model, Two Groups)

simple_med_mgR Documentation

Dataset (Simple Mediation Model, Two Groups)

Description

Generated from a simple mediation model, n = 200, two groups, n = 100 each.

Usage

simple_med_mg

Format

A data frame with 500 rows and four variables:

gp

gp, the grouping variable

x

x, the independent variable

m

m, the mediator

y

y, the dependent variable

Details

This model is used for examples like this one:

library(lavaan)
mod <- "m ~ x
        y ~ m"
fit <- sem(mod, simple_med_mg, gp = "group")
summary(fit)

Examples


print(head(simple_med_mg), digits = 3)
nrow(simple_med_mg)
table(simple_med_mg$gp)


semlbci documentation built on June 22, 2024, 10:55 a.m.