Beta normal distribution

Share:

Description

Computes the pdf, cdf, value at risk and expected shortfall for the beta normal distribution due to Eugene et al. (2002) given by

\begin{array}{ll} &\displaystyle f (x) = \frac {1}{σ B (a, b)} φ ≤ft( \frac {x - μ}{σ} \right) Φ^{a - 1} ≤ft( \frac {x - μ}{σ} \right) Φ^{b - 1} ≤ft( \frac {μ - x}{σ} \right), \\ &\displaystyle F (x) = I_{Φ ≤ft( \frac {x - μ}{σ} \right)} (a, b), \\ &\displaystyle {\rm VaR}_p (X) = μ + σ Φ^{-1} ≤ft( I_p^{-1} (a, b) \right), \\ &\displaystyle {\rm ES}_p (X) = μ + \frac {σ}{p} \int_0^p Φ^{-1} ≤ft( I_v^{-1} (a, b) \right) dv \end{array}

for -∞ < x < ∞, 0 < p < 1, -∞ < μ < ∞, the location parameter, σ > 0, the scale parameter, a > 0, the first shape parameter, and b > 0, the second shape parameter.

Usage

1
2
3
4
dbetanorm(x, mu=0, sigma=1, a=1, b=1, log=FALSE)
pbetanorm(x, mu=0, sigma=1, a=1, b=1, log.p=FALSE, lower.tail=TRUE)
varbetanorm(p, mu=0, sigma=1, a=1, b=1, log.p=FALSE, lower.tail=TRUE)
esbetanorm(p, mu=0, sigma=1, a=1, b=1)

Arguments

x

scaler or vector of values at which the pdf or cdf needs to be computed

p

scaler or vector of values at which the value at risk or expected shortfall needs to be computed

mu

the value of the location parameter, can take any real value, the default is zero

sigma

the value of the scale parameter, must be positive, the default is 1

a

the value of the first shape parameter, must be positive, the default is 1

b

the value of the second shape parameter, must be positive, the default is 1

log

if TRUE then log(pdf) are returned

log.p

if TRUE then log(cdf) are returned and quantiles are computed for exp(p)

lower.tail

if FALSE then 1-cdf are returned and quantiles are computed for 1-p

Value

An object of the same length as x, giving the pdf or cdf values computed at x or an object of the same length as p, giving the values at risk or expected shortfall computed at p.

Author(s)

Saralees Nadarajah

References

S. Nadarajah, S. Chan and E. Afuecheta, An R Package for value at risk and expected shortfall, submitted

Examples

1
2
3
4
5

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