Skip to contents

Random Number Generator from Gamma-Poisson Distribution

Usage

rgampois2(n, mu, phi)

Arguments

n

Number of samples.

mu

Poisson mean (rate)

phi

Parameter determining the dispersion of the outcomes. This parameter is equivalent to Stan's neg_binomial_2(mu, phi)'s phi.

Details

See Chapter 12.1.2 of Statistical Rethinking 2th Edition, which details the Gamma-Poisson distribution for modeling over-dispersed count data.