Zeros trick (source code)

= Zeros trick

A <zeros trick> implements a positive <likelihood function> $L(\theta)$ by adding an observed zero with <Poisson distribution> mean $K-\log L(\theta)$. If this mean is nonnegative throughout the parameter support, its likelihood is $e^{-K}L(\theta)$ and yields the intended <Bayesian posterior>. The constant $K$ must be independent of the parameter; arbitrary clipping changes the target.