data_sem16 {semlrtp} | R Documentation |
A 16-variable dataset with 336 cases.
data_sem16
A data frame with 336 rows and 16 variables:
Indicator. Numeric.
Indicator. Numeric.
Indicator. Numeric.
Indicator. Numeric.
Indicator. Numeric.
Indicator. Numeric.
Indicator. Numeric.
Indicator. Numeric.
Indicator. Numeric.
Indicator. Numeric.
Indicator. Numeric.
Indicator. Numeric.
Indicator. Numeric.
Indicator. Numeric.
Indicator. Numeric.
Indicator. Numeric.
Group with two values, "alpha" and "gamma". Character.
library(lavaan)
data(data_sem16)
mod <-
"
f1 =~ x1 + x2 + x3 + x4
f2 =~ x5 + x6 + x7 + x8
f3 =~ x9 + x10 + x11 + x12
f4 =~ x13 + x14 + x15 + x16
f3 ~ f2 + f1
f4 ~ f3
"
fit <- sem(mod, data_sem16)
summary(fit)