Quantcast
Channel: How to fit a finite mixture of Dirichlet distributions - Stack Overflow
Viewing all articles
Browse latest Browse all 2

How to fit a finite mixture of Dirichlet distributions

$
0
0

I have a compositional sample and I would like to fit a finite mixture of Dirichlet distributions. To be more precise, consider the following example:

library(gtools)set.seed(1)PROB = c(0.25, 0.15, 0.60)ALPHA = list(  c(1,1,1),  c(2,1,1),  c(1,1,20))size = 500N = sapply(1:3, function(i, z) sum(z == i),           sample(1:3, size, prob = PROB, replace = TRUE))X = do.call('rbind',             sapply(1:3, function(i, N)               rdirichlet(N[i], ALPHA[[i]]), N))[sample(1:size),]

X contains sample generated from a mixture of Dirichlet distributions defined in the 3-part simplex. The first Dirichlet component of this mixture has parameter (1,1,1), the second component has parameter (2,1,1) and the third (1,1,20). The mixture probabilities are 0.25, 0.15, 0.60. I would like to retrieve these parameters from the sample.

How would you find this parameters?


Viewing all articles
Browse latest Browse all 2

Latest Images

Trending Articles





Latest Images