Gamma-Beta2 distribution

Share:

Description

Density and random generation for the Gamma-Beta2 distribution with shape parameters a, c, d and rate parameter tau (scale of the Beta2 distribution).

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
dGB2(x, a, c, d, tau)

pGB2(q, a, c, d, tau, ...)

qGB2(p, a, c, d, tau)

rGB2(n, a, c, d, tau)

moment_GB2(k, a, c, d, tau)

summary_GB2(a, c, d, tau, output = "list", ...)

Arguments

x,q

vector of non-negative quantiles

a,c,d

non-negative shape parameters

tau

non-negative rate parameter

...

arguemnts passed to genhypergeo function

p

vector of probabilities

n

number of observations to be sampled

k

the order of the moment

output

type of the summary_GB2 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 τ and then sampling a value from the Gamma distribution with shape a and rate y. The pdf involves the Kummer confluent hypergeometric function of the second kind. The cdf involves the generalized hypergeometric function. Its current implementation does not work when a-d is an integer, and also fails for many other cases.

Value

dGB2 gives the density, pGB2 the cumulative function, rGB2 samples from the distribution, and summary_GB2 gives a summary of the distribution.

Note

GB2Dist is a generic name for the functions documented.

Examples

1
2
3
4
5
a <- 2 ; c <- 4 ; d <- 3; tau <- 1.67
sims <- rGB2(1e6, a, c, d, tau)
mean(sims); moment_GB2(1,a,c,d,tau)
mean(sims^2); moment_GB2(2,a,c,d,tau)
summary_GB2(a,c,d,tau)

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.