GB2Dist {brr} | R Documentation |
Density and random generation for the Gamma-Beta2 distribution
with shape parameters a
, c
, d
and rate parameter tau
(scale of the Beta2 distribution).
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", ...)
x , q |
vector of non-negative quantiles |
a , c , d |
non-negative shape parameters |
tau |
non-negative 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 \tau
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.
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.
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)