powered by
Generated from a simple mediation model, n = 200
simple_med
A data frame with 200 rows and three variables:
x, the independent variable
m, the mediator
y, the dependent variable
This model is used for examples like this one:
library(lavaan) mod <- "m ~ x y ~ m" fit <- cfa(mod, simple_med) summary(fit)
print(head(simple_med), digits = 3) nrow(simple_med)
Run the code above in your browser using DataLab