PGIBDist: Poisson-Gamma-Inverse Beta distribution

Description Usage Arguments Details Value Note Examples

Description

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

Usage

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

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.

Value

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

Note

PGIBDist is a generic name for the functions documented.

Examples

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

Example output

$mean
[1] 1.733333

$sd
[1] 1.699673

$Q1
[1] 0

$Q2
[1] 1

$Q3
[1] 3

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