0
$\begingroup$

I have a model with a marginal likelihood of the following form:

$$\mathcal{L}(\theta_1, \theta_2, \theta_3|\{x_{i,j}\}_{i=1, j=1}^{N, M_i})=\prod_{i=1}^{N}\int_{0}^{1} f(p_i;\theta_1) \prod_{j=1}^{M_i}\big(p_i g(x_{i,j};\theta_2)+(1-p_i) h(x_{i,j};\theta_3)\big)dp_i$$

I wish to numerically solve for $(\theta_1, \theta_2, \theta_3)$ that maximizes the above likelihood. The issue is that the distributions $G$ and $H$ are fairly sharp-peaked, and therefore, the product over $M_i$ tends to very quickly explode to infinity. Usually, in MLE, logging the likelihood fixes this, but I obviously can't bring the log inside an integral. Are there any numerical workarounds or different optimization methods that handle this type of marginalized likelihood?

$\endgroup$
2
  • 4
    $\begingroup$ You can still take logs to turn the product of integrals into a sum of (log) integrals. This will also allow you to turn the second product into a sum, which could further improve the numerical stability $\endgroup$
    – jcken
    Commented Dec 14, 2023 at 17:03
  • 1
    $\begingroup$ It sounds like you would benefit from using the log-exp-sum method. See stats.stackexchange.com/questions/142254 for an account of this for managing underflows. It works equally well, and in the same way, for overflows of course. $\endgroup$
    – whuber
    Commented Dec 14, 2023 at 18:31

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.