Last chance! 50% off unlimited learning
Sale ends in
Simulation of compositional data from mixtures of Dirichlet distributions.
rmixdiri(n, a, prob)
The sample size.
A matrix where each row contains the parameters of each Dirichlet component.
A vector with the mixing probabilities.
A list including:
A numeric variable indicating the cluster of simulated vector.
A matrix containing the simulated compositional data.
A sample from a Dirichlet mixture model is generated.
Ye X., Yu Y. K. and Altschul S. F. (2011). On the inference of Dirichlet mixture priors for protein sequence comparison. Journal of Computational Biology, 18(8), 941-954.
# NOT RUN {
a <- matrix( c(12, 30, 45, 32, 50, 16), byrow = TRUE,ncol = 3)
prob <- c(0.5, 0.5)
x <- rmixdiri(100, a, prob)
# }
Run the code above in your browser using DataLab