R/compare_alphas.R
compare_alphas.Rd
This function provides a graphical display to compare different concentration parameters of Dirichlet distribution.
compare_alphas(n, alpha)
number of weights which is generated from Dirichlet distribution
concentration parameter is given in vector form; each element represents each group.
graphical display of different concentration parameters of Dirichlet distribution
We assumed that the concentration parameters are identical in all weights, it means that \(\boldsymbol{\alpha} =[\alpha, \alpha, \cdots \alpha]\). The probability mass function of the weights is given by: $$\displaystyle{f(w_1,w_2, \cdots w_n;\boldsymbol{\alpha} )=\frac{\displaystyle{\Gamma(n\alpha)}} {{\Gamma(\alpha)}^n} \prod_{i=1}^{n}{w_i^{\alpha-1}}}$$ where \(\boldsymbol{\alpha} =[\alpha, \alpha, \cdots \alpha]\) is the vector of concentration parameters, and \(w_i\) is the stochastic weights which sum to one.
n <- 10000
alpha <- c(5,10,20)
compare_alphas(n,alpha)