This function is used to estimate theta and psi in multinomial mixture model given the number of components k.
ParEst(data, d, k, T = 1000)- data in matrix formation with n rows and p columns
- number of categories for each variable
- number of components
- number of iterations in Gibbs sampler, default value is 1000. T should be an even number for 'burn-in'.
theta - vector of probability for each component
psi - specific probability for each variable in each component