Learn R Programming

brr (version 1.0.0)

PGIBDist: Poisson-Gamma-Inverse Beta distribution

Description

Density and random generation for the Poisson-Gamma-Inverse Beta distribution with shape parameters a, c, d and scale parameter rho.

Usage

dPGIB(x, a, alpha, beta, rho)
pPGIB(q, a, alpha, beta, rho)
qPGIB(p, a, alpha, beta, rho)
rPGIB(n, a, alpha, beta, rho)
summary_PGIB(a, alpha, beta, rho, output = "list", ...)

Arguments

x,q
vector of integer quantiles
a
non-negative shape parameter of the Gamma distribution
alpha,beta
non-negative shape parameters of the mixing Beta distribution
rho
hyperrate parameter (rate of the mixing distribution)
p
vector of probabilities
n
number of observations to be simulated
output
type of the summary_PGIB output: "list" to return a list, "pandoc" to print a table
...
arguments passed to pander.data.frame

Value

dPGIB gives the density, rPGIB samples from the distribution, and summary_PGIB gives a summary of the distribution.

Details

This is the mixture distribution obtained by sampling a value from a Gamma-Inverse Beta distribution and then sampling from a Poisson distribution having this value as mean.

Examples

Run this code
barplot(dPGIB(0:5, a=13, alpha=4, beta=2, rho=2.5), names=0:5)
summary_PGIB(13, 4, 2, 2.5)

Run the code above in your browser using DataLab