This is an old version, view current version.

14.6 Poisson distribution, log parameterization

Stan also provides a parameterization of the Poisson using the log rate \(\alpha = \log \lambda\) as a parameter. This is useful for log-linear Poisson regressions so that the predictor does not need to be exponentiated and passed into the standard Poisson probability function.

14.6.1 Probability mass function

If \(\alpha \in \mathbb{R}\), then for \(n \in \mathbb{N}\), \[ \text{PoissonLog}(n|\alpha) = \frac{1}{n!} \, \exp \left(n\alpha - \exp(\alpha) \right). \]

14.6.2 Sampling statement

n ~ poisson_log(alpha)

Increment target log probability density with poisson_log_lupmf(n | alpha).

14.6.3 Stan functions

real poisson_log_lpmf(ints n | reals alpha)
The log Poisson probability mass of n given log rate alpha

real poisson_log_lupmf(ints n | reals alpha)
The log Poisson probability mass of n given log rate alpha dropping constant additive terms

R poisson_log_rng(reals alpha)
Generate a Poisson variate with log rate alpha; may only be used in transformed data and generated quantities blocks. alpha must be less than \(30 \log 2\). For a description of argument and return types, see section vectorized function signatures.