# Generate example data
set.seed(123)
y <- c(rnorm(60), rnorm(40, 5))
g <- rep(1:2, each = 50)
# Fit fiSAN via VI
est <- fit_fiSAN(y, g, est_method = "VI")
# Plot observational cluster probabilities
plot_vi_allocation_prob(est)
# Plot distributional cluster probabilities
plot_vi_allocation_prob(est, distributional = TRUE)
Run the code above in your browser using DataLab