if (FALSE) { # requireNamespace("lavaan", quietly = TRUE)
# \donttest{
# Structural Equation Models (SEM)
library(lavaan)
structure <- "ind60 =~ x1 + x2 + x3
dem60 =~ y1 + y2 + y3
dem60 ~ ind60"
model <- lavaan::sem(structure, data = PoliticalDemocracy)
r <- report(model)
r
summary(r)
as.data.frame(r)
summary(as.data.frame(r))
# Specific reports
suppressWarnings(report_table(model))
suppressWarnings(report_performance(model))
# }
}
Run the code above in your browser using DataLab