# Compound poisson distribution [closed]

I'm trying to compute a maximum likelihood of compound Poisson gamma distribution in R. The distribution is defined by $$\sum_{j=1}^{N} Y_j$$ where $$Y_n$$ is i.i.d sequence independent $$\operatorname{gamma}(k,\theta)$$ values and $$N$$ is a Poisson distribution with parameter $$\beta$$. I'm trying to estimate this parameters $$\theta$$ and $$\beta$$ without luck. Thanks in advance.

• Have you tried EM? This is a latent variable model. – Xi'an Nov 13 '18 at 21:50
• I used the optim() function, but that does not work! – lina bina Nov 13 '18 at 22:11
• You observed $Y_j$. $\theta$ and $\beta$ are unknown parameters you want to estimate. How about $N$ and $k$? – user158565 Nov 13 '18 at 22:25
• N is observable or not observable? k is known parameter or unknown parameter? – user158565 Nov 13 '18 at 22:47
• Please add a minimal example and explain what is wrong with the results – Juho Kokkala Aug 9 '19 at 19:57