data <- dget('example2data.jags.txt')
colnames(data) <- c('x1', 'x2', 'x3', 'x4', 'x5', 'x6')
model <- "xi1 =~ NA*x1 + x2 + x3 + x4 + x5 + x6
xi2 =~ NA*x4 + x5 + x6 + x1 + x2 + x3"
library(lavaan)
summary(sem(model, data=as.data.frame(data)), standardized=TRUE)

