bgamma: Bernoulli-gamma distribution

Description Usage Arguments Value References See Also Examples

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

1
2
3
4
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

1
  plot(rbgamma(365, prob = 0.2, scale = 1, shape = 1), type = "h")

CaDENCE documentation built on Dec. 5, 2017, 9:03 a.m.