# Example with simulated data
set.seed(123)
data.obj <- sim.LCA(N = 500, I = 4, L = 2, IQ=0.9)
response <- data.obj$response
# Fit 2-class model with EM algorithm
# \donttest{
fit.em <- LCA(response, L = 2, method = "EM", nrep = 10)
entropy_value <- get.entropy(fit.em)
cat("Classification entropy:", round(entropy_value, 3), "\n")
# }
Run the code above in your browser using DataLab