simple_med_mg {semlbci} | R 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)
[Package semlbci version 0.11.2 Index]