| bgamma {CaDENCE} | R Documentation |
Bernoulli-gamma distribution
Description
Functions implementing the Bernoulli-gamma distribution, in which zero values
occur with probability 1-prob and non-zero values follow a gamma
distribution with scale and shape parameters.
dbgamma gives a probability density function (pdf),
pbgamma gives the cumulative distribution
function (cdf), qbgamma gives the quantile function (inverse cdf),
and rbgamma is used for generating random variates.
Usage
dbgamma(x, prob, scale, shape)
pbgamma(q, prob, scale, shape)
qbgamma(p, prob, scale, shape)
rbgamma(n, prob, scale, shape)
Arguments
x, q |
vector of quantiles. |
p |
vector of cumulative probabilities. |
n |
number of random samples. |
prob |
probability of a non-zero value. |
scale |
scale parameter of the gamma distribution. |
shape |
shape parameter of the gamma distribution. |
Value
dbgamma gives the pdf, pbgamma gives the cdf,
qbgamma gives the inverse cdf (or quantile function), and
rbgamma generates random deviates.
References
Cannon, A.J., 2008. Probabilistic multi-site precipitation downscaling by an expanded Bernoulli-gamma density network. Journal of Hydrometeorology, 9(6): 1284-1300.
See Also
dgamma, bweibull, bpareto2,
blnorm
Examples
plot(rbgamma(365, prob = 0.2, scale = 1, shape = 1), type = "h")