# Simulate response data
set.seed(123)
response <- matrix(sample(1:4, 200, replace = TRUE), ncol = 5)
# Generate K-means initialization for 3-class LCA
init_params <- Kmeans.LCA(response, L = 3, nrep = 5)
# Inspect initial class probabilities
print(init_params$params$P.Z)
Run the code above in your browser using DataLab