set.seed(12345)
## Simulate data as shown in Rau et al. (2011)
## Library size setting "A", high cluster separation
## n = 2000 observations
simulate <- PoisMixSim(n = 200, libsize = "A", separation = "high")
y <- simulate$y
conds <- simulate$conditions
## Run the PMM-II model for g = {3, 4, 5}
## "TC" library size estimate, EM algorithm
run <- PoisMixClus(y, gmin = 3, gmax = 5, lib.size = TRUE,
lib.type = "TC", conds = conds, init.type = "small-em")
## Visualization of results (not run):
## ICL results:
## plot(run, cluster.choice = "ICL")
## BIC results:
## plot(run, cluster.choice = "BIC")
## Results for cluster size = 5:
## plot(run, cluster.choice = 5)Run the code above in your browser using DataLab