nimble-dev / nimble

The base NIMBLE package for R
http://R-nimble.org
BSD 3-Clause "New" or "Revised" License
160 stars 24 forks source link

Robustify handling of numerical issues in CRP #1509

Open paciorek opened 3 weeks ago

paciorek commented 3 weeks ago

This is motivated specifically by a Dirichlet-Multinomial case (see nimble-users post 2024-10-16) with nested Dirichlet distributions and conjugate sampling for the Dirichlet-distributed variable that is a dependency of the CRP cluster memberships. Much of the issue occurs when the Dirichlet dependency has an exact 0 because of numerical underflow. Not clear whether the numerical issues would arise in other cases.

The PR: