library(exactICLforLCA)
library(BayesLCA)
# Read data
data(Alzheimer)
## set CONSTANTS
alpha_var <- 1
beta_var <- 1
delta_var <- 1
G <- as.integer(readline(prompt="Enter the number of groups: "))
# LCA fit
fit <- blca.em(Alzheimer, G)
Z <- unMAP(MAP(Zscore(Alzheimer, fit)))
Y <- as.matrix(Alzheimer)
res <- ICLFit(Z, Y, G, alpha_var, beta_var, delta_var)
ICLsummary()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.