neg_binomial_2_lpmf_stan: Negative Binomial Log Probability Mass Function Stan Code

neg_binomial_2_lpmf_stanR Documentation

Negative Binomial Log Probability Mass Function Stan Code

Description

There are two negative binomial density functions built into Stan:

real neg_binomial_lpmf(ints n | reals alpha, reals beta)
real neg_binomial_2_lpmf(ints y | reals mu, reals phi)

The second one uses the mean and over-dispersion parameterisation familiar to ecologists.

See https://mc-stan.org/docs/2_19/functions-reference/negative-binomial-distribution.html and https://mc-stan.org/docs/2_19/functions-reference/nbalt.html for more details.

Examples

cat(neg_binomial_2_lpmf_stan[["source_code"]])

PRIMER-e/probabilityDistributions documentation built on Jan. 4, 2023, 10:32 a.m.