# \donttest{
HS.model <- "
visual =~ x1 + x2 + x3
textual =~ x4 + x5 + x6
speed =~ x7 + x8 + x9
"
utils::data("HolzingerSwineford1939", package = "lavaan")
fit <- acfa(HS.model, HolzingerSwineford1939, std.lv = TRUE, nsamp = 100,
test = "none", verbose = FALSE)
# Posterior latent variable scores
lv_scores <- predict(fit)
head(lv_scores)
# Predicted observed variable means
yhat <- predict(fit, type = "yhat")
head(yhat)
# }
Run the code above in your browser using DataLab