# NOT RUN {
HS.model <- ' visual =~ x1 + x2 + x3
textual =~ x4 + x5 + x6
speed =~ x7 + x8 + x9 '
dat <- data.frame(HolzingerSwineford1939, z=rnorm(nrow(HolzingerSwineford1939), 0, 1))
fit <- cfa(HS.model, data=dat)
fitaux <- auxiliary(HS.model, aux="z", data=dat, fun="cfa")
# }
Run the code above in your browser using DataLab