Density and random generation
for the Poisson-Gamma-Beta2 distribution
with shape parameters a, c, d
and hyperrate parameter tau (scale of the Beta2 distribution).
For tau=1 this is the same as the Beta-negative binomial distribution.
Usage
dPGB2(x, a, c, d, tau)
pPGB2(q, a, c, d, tau)
qPGB2(p, a, c, d, tau)
rPGB2(n, a, c, d, tau)
summary_PGB2(a, c, d, tau, output = "list")
Arguments
x,q
vector of non-negative integer quantiles
a,c,d
non-negative shape parameters
tau
non-negative hyperrate parameter
p
vector of probabilities
n
number of observations to be sampled
output
type of the summary_PGB2 output: "list" to return a list, "pandoc" to print a table
Value
dPGB2 gives the density, pPGB2 the cumulative function,
rPGB2 samples from the distribution, and summary_PGB2 gives
a summary of the distribution.
Details
This is the mixture distribution obtained by sampling a value $y$
from the Beta2 distribution with shape parameters $c$, $d$,
and scale $\tau$,
then sampling a value $\lambda$ from the Gamma distribution with
shape $a$ and rate $y$, and
then sampling the Poisson distribution with mean $\lambda$.