# NOT RUN {
### Examples from lavCor (lavaan): ###
library("lavaan")
# Holzinger and Swineford (1939) example
HS9 <- HolzingerSwineford1939[,c("x1","x2","x3","x4","x5",
"x6","x7","x8","x9")]
# Pearson correlations
cor_auto(HS9)
# ordinal version, with three categories
HS9ord <- as.data.frame( lapply(HS9, cut, 3, labels=FALSE) )
# polychoric correlations, two-stage estimation
cor_auto(HS9ord)
# }
Run the code above in your browser using DataLab