if (FALSE) { # rlang::is_installed("lavaan")
# load libraries for models and data
library(lavaan)
cfa.fit <- cfa("F =~ x1 + x2 + x3 + x4 + x5 + x6 + x7 + x8 + x9",
data = HolzingerSwineford1939, group = "school"
)
tidy(cfa.fit)
}
Run the code above in your browser using DataLab