PGB2Dist {brr} | R Documentation |
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.
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")
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 |
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
.
dPGB2
gives the density, pPGB2
the cumulative function,
rPGB2
samples from the distribution, and summary_PGB2
gives
a summary of the distribution.
PGB2Dist
is a generic name for the functions documented.
a <- 2 ; c <- 5 ; d <- 30; tau <- 2
barplot(dPGB2(0:40, a, c, d, tau), names=0:40)
summary_PGB2(a,c,d,tau, output="pandoc")