PGB2Dist: Poisson-Gamma-Beta2 distribution

Description Usage Arguments Details Value Note Examples

Description

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

1
2
3
4
5
6
7
8
9
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

Details

This is the mixture distribution obtained by sampling a value y from the Beta2 distribution with shape parameters c, d, and scale τ, then sampling a value λ from the Gamma distribution with shape a and rate y, and then sampling the Poisson distribution with mean λ.

Value

dPGB2 gives the density, pPGB2 the cumulative function, rPGB2 samples from the distribution, and summary_PGB2 gives a summary of the distribution.

Note

PGB2Dist is a generic name for the functions documented.

Examples

1
2
3
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")

brr documentation built on May 2, 2019, 1:04 a.m.