Density and random generation for the GammaBeta2 distribution
with shape parameters a
, c
, d
and rate parameter tau
(scale of the Beta2 distribution).
1 2 3 4 5 6 7 8 9 10 11 
x,q 
vector of nonnegative quantiles 
a,c,d 
nonnegative shape parameters 
tau 
nonnegative rate parameter 
... 
arguemnts passed to 
p 
vector of probabilities 
n 
number of observations to be sampled 
k 
the order of the moment 
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 τ 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 ad
is an integer, and also fails for many other cases.
dGB2
gives the density, pGB2
the cumulative function,
rGB2
samples from the distribution, and summary_GB2
gives a summary
of the distribution.
GB2Dist
is a generic name for the functions documented.
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)

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.
All documentation is copyright its authors; we didn't write any of that.