You are on page 1of 163

Package ‘VaRES’

February 19, 2015


Type Package
Title Computes value at risk and expected shortfall for over 100
parametric distributions
Version 1.0
Date 2013-8-25
Author Saralees Nadarajah, Stephen Chan and Emmanuel Afuecheta
Maintainer Saralees Nadarajah <Saralees.Nadarajah@manchester.ac.uk>
Depends R (>= 2.15.0)
Description Computes Value at risk and expected shortfall, two most popular measures of finan-
cial risk, for over one hundred parametric distributions, including all commonly known distribu-
tions. Also computed are the corresponding probability density function and cumulative distri-
bution function.
License GPL (>= 2)
NeedsCompilation no
Repository CRAN
Date/Publication 2013-08-27 08:07:57

R topics documented:
VaRES-package . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
aep . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
arcsine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
ast . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
asylaplace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
asypower . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
beard . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
betaburr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
betaburr7 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
betadist . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
betaexp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
betafrechet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
betagompertz . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21

1
2 R topics documented:

betagumbel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
betagumbel2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
betalognorm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
betalomax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
betanorm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
betapareto . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
betaweibull . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
BS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
burr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
burr7 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
Cauchy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
chen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
clg . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
compbeta . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
dagum . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
dweibull . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
expexp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
expext . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
expgeo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
explog . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
explogis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
exponential . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
exppois . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
exppower . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
expweibull . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
F. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
FR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
frechet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
Gamma . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
genbeta . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
genbeta2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
geninvbeta . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
genlogis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
genlogis3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
genlogis4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
genpareto . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
genpowerweibull . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
genunif . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
gev . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
gompertz . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
gumbel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
gumbel2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
halfcauchy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
halflogis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
halfnorm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
halfT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
HBlaplace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82
HL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
R topics documented: 3

Hlogis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
invbeta . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
invexpexp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
invgamma . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88
kum . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
kumburr7 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
kumexp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92
kumgamma . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
kumgumbel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95
kumhalfnorm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96
kumloglogis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
kumnormal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99
kumpareto . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100
kumweibull . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102
laplace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103
lfr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104
LNbeta . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106
logbeta . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107
logcauchy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108
loggamma . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109
logisexp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111
logisrayleigh . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112
logistic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113
loglaplace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114
loglog . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116
loglogis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117
lognorm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119
lomax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120
Mlaplace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121
moexp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123
moweibull . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124
MRbeta . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125
nakagami . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127
normal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128
pareto . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129
paretostable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130
PCTAlaplace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132
perks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133
power1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134
power2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136
quad . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137
rgamma . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138
RS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140
schabe . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141
secant . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142
stacygamma . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143
T. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144
TL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146
4 aep

TL2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147
triangular . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 148
tsp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 150
uniform . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151
weibull . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152
xie . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 154

Index 156

VaRES-package Computes value at risk and expected shortfall for over 100 parametric
distributions

Description
Computes Value at risk and expected shortfall, two most popular measures of financial risk, for over
one hundred parametric distributions, including all commonly known distributions. Also computed
are the corresponding probability density function and cumulative distribution function.

Details

Package: VaRES
Type: Package
Version: 1.0
Date: 2013-8-25
License: GPL(>=2)

Author(s)

Saralees Nadarajah, Stephen Chan and Emmanuel Afuecheta


Maintainer: Saralees Nadarajah <Saralees.Nadarajah@manchester.ac.uk>

References

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

aep Asymmetric exponential power distribution


aep 5

Description
Computes the pdf, cdf, value at risk and expected shortfall for the asymmetric exponential power
distribution due to Zhu and Zinde-Walsh (2009) given by
  
α 1 x q1
K (q ) exp − , if x ≤ 0,

1

 ∗
 α q1 2α∗

f (x) =  q 
1−α 1 x 2


K (q2 ) exp − , if x > 0


 1 − α∗  q1 q2 2 − 2α


1 |x| 1
αQ , , if x ≤ 0,


q1 2α∗ q1



F (x) =   q2 
1 |x| 1


 1 − (1 − α)Q , , if x > 0


q2 2 − 2α∗ q2
    q1
p 1 1
−2α∗ q1 Q−1

, , if p ≤ α,


α q1



VaRp (X) =
    q1
1−p 1
 2
 2 (1 − α∗ ) q2 Q−1

, , if p > α,


1 − α q2
  q1
 2α∗ p
Z  
−1 v 1 1

 − q 1 Q , dv, if p ≤ α,



 p 0 α q1



 q1
ESp (X) = 2α∗ α
Z  
−1 v 1 1
 − q1 Q , dv
p 0 α q1




∗ Z p
   q1
 + 2 (1 − α ) 1−v 1

2

−1

 q2 Q , dv, if p > α
p α 1 − α q2

for −∞ < x < ∞, 0 < p < 1, 0 < α < 1, the scale parameter, q1 > 0, the first shape parame-

R ∞ a−1 where α = αK (q1 ) / {αK (q1 ) + (1 − α)K (q2 )},
ter, and q2 > 0, the second shape parameter,
1
K(q) = 2q1/q Γ(1+1/q) , Q(a, x) = x t exp (−t) dt/Γ(a) denotes the regularized complemen-
R ∞ a−1
tary incomplete gamma function, Γ(a) = 0 t exp (−t) dt denotes the gamma function, and
Q−1 (a, x) denotes the inverse of Q(a, x).

Usage
daep(x, q1=1, q2=1, alpha=0.5, log=FALSE)
paep(x, q1=1, q2=1, alpha=0.5, log.p=FALSE, lower.tail=TRUE)
varaep(p, q1=1, q2=1, alpha=0.5, log.p=FALSE, lower.tail=TRUE)
esaep(p, q1=1, q2=1, alpha=0.5)

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
alpha the value of the scale parameter, must be in the unit interval, the default is 0.5
6 arcsine

q1 the value of the first shape parameter, must be positive, the default is 1
q2 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
x=runif(10,min=0,max=1)
daep(x)
paep(x)
varaep(x)
esaep(x)

arcsine Arcsine distribution

Description
Computes the pdf, cdf, value at risk and expected shortfall for the arcsine distribution given by

1
f (x) = p ,
π (x − a)(b
r − x) 
2 x−a
F (x) = arcsin ,
π b−a  
πp
VaRp (X) = a + (b − a) sin2 ,
2
b − a p 2  πv 
Z
ESp (X) = a + sin dv
p 0 2

for a ≤ x ≤ b, 0 < p < 1, −∞ < a < ∞, the first location parameter, and −∞ < a < b < ∞, the
second location parameter.
arcsine 7

Usage

darcsine(x, a=0, b=1, log=FALSE)


parcsine(x, a=0, b=1, log.p=FALSE, lower.tail=TRUE)
vararcsine(p, a=0, b=1, log.p=FALSE, lower.tail=TRUE)
esarcsine(p, a=0, 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
a the value of the first location parameter, can take any real value, the default is
zero
b the value of the second location parameter, can take any real value but must be
greater than a, 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

x=runif(10,min=0,max=1)
darcsine(x)
parcsine(x)
vararcsine(x)
esarcsine(x)
8 ast

ast Generalized asymmetric Student’s t distribution

Description
Computes the pdf, cdf, value at risk and expected shortfall for the generalized asymmetric Student’s
t distribution due to Zhu and Galbraith (2010) given by
 x 2 − ν12+1
 
 α 1
K (ν1 ) 1 + , if x ≤ 0,


∗ ν1 2α∗
 α



f (x) =

 1−α
"  2 #− ν22+1
1 x



 K (ν2 ) 1 + , if x > 0
1 − α∗ ν2 2 (1 − α∗ )

   
min(x, 0) max(x, 0)
F (x) = 2αFν1 − 1 + α + 2(1 − α)Fν2 ,
2α∗   2 − 2α


∗ −1 min(p, α) ∗ −1 max(p, α) + 1 − 2α
VaRp (X) = 2α Fν1 + 2 (1 − α ) Fν2 ,
 2α 2−  2α
∗ Z p ∗ Z p
 
2α −1 min(v, α) 2 (1 − α ) −1 max(v, α) + 1 − 2α
ESp (X) = F dv + Fν2 dv
p 0 ν1 2α p 0 2 − 2α
for −∞ < x < ∞, 0 < p < 1, 0 < α < 1, the scale parameter, ν1 > 0, the first de-
gree of freedom parameter, and ν2 > 0, the second degree of freedom
√ parameter, where α∗ =
αK (ν1 ) / {αK (ν1 ) + (1 − α)K (ν2 )}, K(ν) = Γ ((ν + 1)/2) / [ πνΓ(ν/2)], Fν (·) denotes the
cdf of a Student’s t random variable with ν degrees of freedom, and Fν−1 (·) denotes the inverse of
Fν (·).

Usage
dast(x, nu1=1, nu2=1, alpha=0.5, log=FALSE)
past(x, nu1=1, nu2=1, alpha=0.5, log.p=FALSE, lower.tail=TRUE)
varast(p, nu1=1, nu2=1, alpha=0.5, log.p=FALSE, lower.tail=TRUE)
esast(p, nu1=1, nu2=1, alpha=0.5)

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
alpha the value of the scale parameter, must be in the unit interval, the default is 0.5
nu1 the value of the first degree of freedom parameter, must be positive, the default
is 1
nu2 the value of the second degree of freedom parameter, must be positive, the de-
fault 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
asylaplace 9

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

x=runif(10,min=0,max=1)
dast(x)
past(x)
varast(x)
esast(x)

asylaplace Asymmetric Laplace distribution


10 asylaplace

Description
Computes the pdf, cdf, value at risk and expected shortfall for the asymmetric Laplace distribution
due to Kotz et al. (2001) given by
 √ √ !
 κ 2 κ 2
exp − |x − θ| , if x ≥ θ,


2
 τ (1 + κ ) τ



f (x) =
 √ √ !

 κ 2 2
 τ (1 + κ2 ) exp − κτ |x − θ| , if x < θ,



 √ !
 1 κ 2(θ − x)
1− exp , if x ≥ θ,




 1+κ 2 τ

F (x) =
 2
√ !

 κ 2(x − θ)
 1 + κ2 exp , if x < θ,


κτ

 τ κ2
θ − √ log (1 − p) 1 + κ2 , if p ≥ 1+κ
 
 2,

 2κ
VaRp (X) =
κτ κ2
log p 1 + κ−2 ,
  
 θ+ √

if p < 1+κ 2,
 2 √ 
θ τ 2τ 1 + 2κ2
 + θ − √ log 1 + κ2 + log 1 + κ2

  
2
 p √ 2κ 2κ (1 + κ ) p 




 2τ κ log κ θκ 2 τ 1 − κ4
− − + √


(1 + κ2 ) p (1 + κ2 ) p 2κ (1 + κ2 ) p


ESp (X) = τ (1 − p) τ (1 − p) κ2

 − √ + √ log(1 − p), if p ≥ 1+κ 2,
2κp 2κp






κτ  κτ

κ2

 θ + √ log 1 + κ−2 + √ (log p − 1), if p < 1+κ

 2
2 2
for −∞ < x < ∞, 0 < p < 1, −∞ < θ < ∞, the location parameter, κ > 0, the first scale
parameter, and τ > 0, the second scale parameter.

Usage
dasylaplace(x, tau=1, kappa=1, theta=0, log=FALSE)
pasylaplace(x, tau=1, kappa=1, theta=0, log.p=FALSE, lower.tail=TRUE)
varasylaplace(p, tau=1, kappa=1, theta=0, log.p=FALSE, lower.tail=TRUE)
esasylaplace(p, tau=1, kappa=1, theta=0)

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
theta the value of the location parameter, can take any real value, the default is zero
kappa the value of the first scale parameter, must be positive, the default is 1
asypower 11

tau the value of the second scale 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

x=runif(10,min=0,max=1)
dasylaplace(x)
pasylaplace(x)
varasylaplace(x)
esasylaplace(x)

asypower Asymmetric power distribution


12 asypower

Description
Computes the pdf, cdf, value at risk and expected shortfall for the asymmetric power distribution
due to Komunjer (2007) given by

δ 1/λ
  
δ λ
exp − |x| , if x ≤ 0,


 Γ(1 + 1/λ) aλ


f (x) =
δ 1/λ
 
δ


 λ

 exp − λ
|x| , if x > 0
 Γ(1 + 1/λ) (1 − a)
δ √
 
a − aI λ|x|λ , 1/λ , if x ≤ 0,






F (x) =

 

 δ λ
 a − (1 − a)I λ|x| , 1/λ , if x > 0


  (1 − a)λ
1/λ 1/λ

  
 −1 p 1
− √ I 1− , , if p ≤ a,


a λ


 δ λ
VaRp (X) =
 1/λ  1/λ
(1 − a)λ
 
1−p 1


 − √ I −1 1 − , , if p > a,


δ λ 1−a λ
 1/λ Z p  1/λ
 1 aλ
 
−1 v 1

 − √ I 1 − , dv, if p ≤ a,
 p δ λ

 0 a λ




1/λ Z a  1/λ
ESp (X) = 1 aλ
 
−1 v 1
 − √ I 1 − , dv
p δ λ a λ

0


λ 1/λ Z p
     1/λ
− −


 1 (1 a) −1 1 v 1
 −
 √ I 1− , dv, if p > a
p δ λ a 1−a λ
for −∞ < x < ∞, 0 < p < 1, 0 < a < 1, the first scale parameter, δ > 0, the second scale
1
R x√γ γ−1
parameter, and λ > 0, the shape parameter, where I(x, γ) = Γ(γ) 0
t exp(−t)dt.

Usage
dasypower(x, a=0.5, lambda=1, delta=1, log=FALSE)
pasypower(x, a=0.5, lambda=1, delta=1, log.p=FALSE, lower.tail=TRUE)
varasypower(p, a=0.5, lambda=1, delta=1, log.p=FALSE, lower.tail=TRUE)
esasypower(p, a=0.5, lambda=1, delta=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
a the value of the first scale parameter, must be in the unit interval, the default is
0.5
delta the value of the second scale parameter, must be positive, the default is 1
lambda the value of the shape parameter, must be positive, the default is 1
beard 13

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
x=runif(10,min=0,max=1)
dasypower(x)
pasypower(x)
varasypower(x)
esasypower(x)

beard Beard distribution

Description
Computes the pdf, cdf, value at risk and expected shortfall for the Beard distribution due to Beard
(1959) given by
ρ−1/b
a exp(bx) [1 + aρ]
f (x) = ,
1+ρ−1/b
[1 + aρ exp(bx)]
ρ−1/b
[1 + aρ]
F (x) = 1 − ,
ρ−1/b
[1 + aρ
 exp(bx)] 
1 1 + aρ 1
VaRp (X) = log ρ1/b
− ,
bZ  − p)
aρ(1 aρ
p 
1 1 1 + aρ
ESp (X) = log − + dv
pb 0 aρ aρ(1 − v)ρ1/b
for x > 0, 0 < p < 1, a > 0, the first scale parameter, b > 0, the second scale parameter, and
ρ > 0, the shape parameter.
14 beard

Usage

dbeard(x, a=1, b=1, rho=1, log=FALSE)


pbeard(x, a=1, b=1, rho=1, log.p=FALSE, lower.tail=TRUE)
varbeard(p, a=1, b=1, rho=1, log.p=FALSE, lower.tail=TRUE)
esbeard(p, a=1, b=1, rho=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
a the value of the first scale parameter, must be positive, the default is 1
b the value of the second scale parameter, must be positive, the default is 1
rho the value of the 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

x=runif(10,min=0,max=1)
dbeard(x)
pbeard(x)
varbeard(x)
esbeard(x)
betaburr 15

betaburr Beta Burr distribution

Description
Computes the pdf, cdf, value at risk and expected shortfall for the beta Burr distribution due to
Parana\’iba et al. (2011) given by

babd h
−b
i−c−d
f (x) = 1 + (x/a) ,
B(c, d)xbd+1
F (x) = I 1 (c, d),
1+(x/a)−b
 −1 1/b  −1/b
VaRp (X) = aZ Ip (c, d) 1 − Ip−1 (c, d) ,
a p  −1 1/b  −1
−1/b
ESp (X) = Iv (c, d) 1 − Iv (c, d) dv
p 0

for x > 0, 0 < p < 1, a > 0, the scale parameter, b > 0, the first shape parameter, R x c > 0,
the second shape parameter, and d > 0, the third shape parameter, where Ix (a, b) = 0 ta−1 (1 −
R1
t)b−1 dt/B(a, b) denotes the incomplete beta function ratio, B(a, b) = 0 ta−1 (1−t)b−1 dt denotes
the beta function, and Ix−1 (a, b) denotes the inverse function of Ix (a, b).

Usage
dbetaburr(x, a=1, b=1, c=1, d=1, log=FALSE)
pbetaburr(x, a=1, b=1, c=1, d=1, log.p=FALSE, lower.tail=TRUE)
varbetaburr(p, a=1, b=1, c=1, d=1, log.p=FALSE, lower.tail=TRUE)
esbetaburr(p, a=1, b=1, c=1, d=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
a the value of the scale parameter, must be positive, the default is 1
b the value of the first shape parameter, must be positive, the default is 1
c the value of the second shape parameter, must be positive, the default is 1
d the value of the third 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.
16 betaburr7

Author(s)
Saralees Nadarajah

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

Examples
x=runif(10,min=0,max=1)
dbetaburr(x)
pbetaburr(x)
varbetaburr(x)
esbetaburr(x)

betaburr7 Beta Burr XII distribution

Description
Computes the pdf, cdf, value at risk and expected shortfall for the beta Burr XII distribution given
by
kcxc−1 h −k
ia−1
−bk−1
f (x) = 1 − (1 + xc ) (1 + xc ) ,
B(a, b)
F (x) = I1−(1+xc )−k (a, b),
n −1/k o1/c
VaRp (X) = 1 − Ip−1 (a, b) −1 ,
Z pn 1/c
1 −1/k
o
1 − Iv−1 (a, b)
 
ESp (X) = −1 dv
p 0
for x > 0, 0 < p < 1, a > 0, the first shape parameter, b > 0, the second shape parameter, c > 0,
the third shape parameter, and k > 0, the fourth shape parameter.

Usage
dbetaburr7(x, a=1, b=1, c=1, k=1, log=FALSE)
pbetaburr7(x, a=1, b=1, c=1, k=1, log.p=FALSE, lower.tail=TRUE)
varbetaburr7(p, a=1, b=1, c=1, k=1, log.p=FALSE, lower.tail=TRUE)
esbetaburr7(p, a=1, b=1, c=1, k=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
a the value of the first shape parameter, must be positive, the default is 1
betadist 17

b the value of the second shape parameter, must be positive, the default is 1
c the value of the third shape parameter, must be positive, the default is 1
k the value of the fourth 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
x=runif(10,min=0,max=1)
dbetaburr7(x)
pbetaburr7(x)
varbetaburr7(x)
esbetaburr7(x)

betadist Beta distribution

Description
Computes the pdf, cdf, value at risk and expected shortfall for the beta distribution given by

xa−1 (1 − x)b−1
f (x) = ,
B(a, b)
F (x) = Ix (a, b),
VaRp (X) = IZp−1 (a, b),
1 p −1
ESp (X) = I (a, b)dv
p 0 v

for 0 < x < 1, 0 < p < 1, a > 0, the first parameter, and b > 0, the second shape parameter.
18 betadist

Usage

dbetadist(x, a=1, b=1, log=FALSE)


pbetadist(x, a=1, b=1, log.p=FALSE, lower.tail=TRUE)
varbetadist(p, a=1, b=1, log.p=FALSE, lower.tail=TRUE)
esbetadist(p, 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
a the value of the first scale parameter, must be positive, the default is 1
b the value of the second scale 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

x=runif(10,min=0,max=1)
dbetadist(x)
pbetadist(x)
varbetadist(x)
esbetadist(x)
betaexp 19

betaexp Beta exponential distribution

Description
Computes the pdf, cdf, value at risk and expected shortfall for the beta exponential distribution due
to Nadarajah and Kotz (2006) given by

λ exp(−bλx) a−1
f (x) = [1 − exp(−λx)] ,
B(a, b)
F (x) = I1−exp(−λx) (a, b),
1
VaRp (X) = − log 1 − Ip−1 (a, b) ,
 
λZ p
1
log 1 − Iv−1 (a, b) dv
 
ESp (X) = −
pλ 0

for x > 0, 0 < p < 1, a > 0, the first shapeR parameter, b > 0, the second shape parameter, and
x
λ > 0, the scale parameter, where Ix (a, b) = 0 ta−1 (1 − t)b−1 dt/B(a, b) denotes the incomplete
R 1 a−1
beta function ratio, B(a, b) = 0 t (1 − t)b−1 dt denotes the beta function, and Ix−1 (a, b) denotes
the inverse function of Ix (a, b).

Usage
dbetaexp(x, lambda=1, a=1, b=1, log=FALSE)
pbetaexp(x, lambda=1, a=1, b=1, log.p=FALSE, lower.tail=TRUE)
varbetaexp(p, lambda=1, a=1, b=1, log.p=FALSE, lower.tail=TRUE)
esbetaexp(p, lambda=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
lambda 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.
20 betafrechet

Author(s)
Saralees Nadarajah

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

Examples
x=runif(10,min=0,max=1)
dbetaexp(x)
pbetaexp(x)
varbetaexp(x)
esbetaexp(x)

betafrechet Beta Frechet distribution

Description
Computes the pdf, cdf, value at risk and expected shortfall for the beta Fr\’echet distribution due to
Barreto-Souza et al. (2011) given by

ασ α n  σ α o h n  σ α oib−1
f (x) = exp −a 1 − exp − ,
xα+1 B(a, b) x x
F (x) = Iexp{−( σ )α } (a, b),
x −1/α
VaRp (X) = σZ − log Ip−1 (a, b) ,
σ p −1
−1/α
ESp (X) = − log Iv (a, b) dv
p 0

for x > 0, 0 < p < 1, a > 0, the first shape parameter, σ > 0, the scale parameter, b > 0, the
second shape parameter, and α > 0, the third shape parameter.

Usage
dbetafrechet(x, a=1, b=1, alpha=1, sigma=1, log=FALSE)
pbetafrechet(x, a=1, b=1, alpha=1, sigma=1, log.p=FALSE, lower.tail=TRUE)
varbetafrechet(p, a=1, b=1, alpha=1, sigma=1, log.p=FALSE, lower.tail=TRUE)
esbetafrechet(p, a=1, b=1, alpha=1, sigma=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
sigma the value of the scale parameter, must be positive, the default is 1
betagompertz 21

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
alpha the value of the third 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
x=runif(10,min=0,max=1)
dbetafrechet(x)
pbetafrechet(x)
varbetafrechet(x)
esbetafrechet(x)

betagompertz Beta Gompertz distribution

Description
Computes the pdf, cdf, value at risk and expected shortfall for the beta Gompertz distribution due
to Cordeiro et al. (2012b) given by

bη exp(bx) c−1
f (x) = exp (dη) exp [−dη exp(bx)] {1 − exp [η − η exp(bx)]} ,
B(c, d)
F (x) = I1−exp[η−ηexp(bx)] (c, d), 
1 1
VaRp (X) = log 1 − log 1 − Ip−1 (c, d) ,
 
bZ  η
p 
1 1
log 1 − log 1 − Iv−1 (c, d) dv
 
ESp (X) =
pb 0 η

for x > 0, 0 < p < 1, b > 0, the first scale parameter, η > 0, the second scale parameter, c > 0,
the first shape parameter, and d > 0, the second shape parameter.
22 betagompertz

Usage

dbetagompertz(x, b=1, c=1, d=1, eta=1, log=FALSE)


pbetagompertz(x, b=1, c=1, d=1, eta=1, log.p=FALSE, lower.tail=TRUE)
varbetagompertz(p, b=1, c=1, d=1, eta=1, log.p=FALSE, lower.tail=TRUE)
esbetagompertz(p, b=1, c=1, d=1, eta=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
b the value of the first scale parameter, must be positive, the default is 1
eta the value of the second scale parameter, must be positive, the default is 1
c the value of the first shape parameter, must be positive, the default is 1
d 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
x=runif(10,min=0,max=1)
dbetagompertz(x)
pbetagompertz(x)
varbetagompertz(x)
esbetagompertz(x)
betagumbel 23

betagumbel Beta Gumbel distribution

Description
Computes the pdf, cdf, value at risk and expected shortfall for the beta Gumbel distribution due to
Nadarajah and Kotz (2004) given by
     b−1
1 µ−x µ−x µ−x
f (x) = exp exp −a exp 1 − exp − exp ,
σB(a, b) σ σ σ
F (x) = Iexp[− exp µ−x ] (a, b),
σ
VaRp (X) = µ − σZlog − log Ip−1 (a, b) ,
 
σ p
log − log Iv−1 (a, b) dv
 
ESp (X) = µ −
p 0
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
dbetagumbel(x, a=1, b=1, mu=0, sigma=1, log=FALSE)
pbetagumbel(x, a=1, b=1, mu=0, sigma=1, log.p=FALSE, lower.tail=TRUE)
varbetagumbel(p, a=1, b=1, mu=0, sigma=1, log.p=FALSE, lower.tail=TRUE)
esbetagumbel(p, a=1, b=1, mu=0, sigma=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
24 betagumbel2

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

Examples
x=runif(10,min=0,max=1)
dbetagumbel(x)
pbetagumbel(x)
varbetagumbel(x)
esbetagumbel(x)

betagumbel2 Beta Gumbel 2 distribution

Description
Computes the pdf, cdf, value at risk and expected shortfall for the beta Gumbel II distribution given
by
abx−a−1 c−1
exp −bdx−a 1 − exp −bx−a

f (x) = ,
B(c, d)
F (x) = I1−exp(−bx−a ) (c, d),
 −1/a
VaRp (X) = b1/a − log 1 − Ip−1 (c, d)
 
,
b1/a p 
Z
−1/a
− log 1 − Iv−1 (c, d)
 
ESp (X) = dv
p 0
for x > 0, 0 < p < 1, a > 0, the first shape parameter, b > 0, the scale parameter, c > 0, the
second shape parameter, and d > 0, the third shape parameter.

Usage
dbetagumbel2(x, a=1, b=1, c=1, d=1, log=FALSE)
pbetagumbel2(x, a=1, b=1, c=1, d=1, log.p=FALSE, lower.tail=TRUE)
varbetagumbel2(p, a=1, b=1, c=1, d=1, log.p=FALSE, lower.tail=TRUE)
esbetagumbel2(p, a=1, b=1, c=1, d=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
b 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
c the value of the second shape parameter, must be positive, the default is 1
d the value of the third 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
betalognorm 25

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
x=runif(10,min=0,max=1)
dbetagumbel2(x)
pbetagumbel2(x)
varbetagumbel2(x)
#esbetagumbel2(x)

betalognorm Beta lognormal distribution

Description
Computes the pdf, cdf, value at risk and expected shortfall for the beta lognormal distribution due
to Castellares et al. (2013) given by
     
1 log x − µ a−1 log x − µ b−1 µ − log x
f (x) = φ Φ Φ ,
σxB(a, b) σ σ σ
F (x) = IΦ( log x−µ ) (a, b),
σ 
VaRp (X) = exp µZ+ σΦ−1 Ip−1 (a, b) ,

exp(µ) p
exp σΦ−1 Iv−1 (a, b) dv
 
ESp (X) =
p 0

for x > 0, 0 < p < 1, −∞ < µ < ∞, the location parameter, σ > 0, the scale parameter, a > 0,
the first shape parameter, and b > 0, the second shape parameter, where φ(·) denotes the pdf of a
standard normal random variable, and Φ(·) denotes the cdf of a standard normal random variable.

Usage
dbetalognorm(x, a=1, b=1, mu=0, sigma=1, log=FALSE)
pbetalognorm(x, a=1, b=1, mu=0, sigma=1, log.p=FALSE, lower.tail=TRUE)
varbetalognorm(p, a=1, b=1, mu=0, sigma=1, log.p=FALSE, lower.tail=TRUE)
esbetalognorm(p, a=1, b=1, mu=0, sigma=1)
26 betalomax

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

x=runif(10,min=0,max=1)
dbetalognorm(x)
pbetalognorm(x)
varbetalognorm(x)
esbetalognorm(x)

betalomax Beta Lomax distribution


betalomax 27

Description
Computes the pdf, cdf, value at risk and expected shortfall for the beta Lomax distribution due to
Lemonte and Cordeiro (2013) given by
 a−1
α  x −bα−1  x −α
f (x) = 1+ 1− 1+ ,
λB(a, b) λ λ
F (x) = I1−(1+ x )−α (a, b),
λ −1/α
VaRp (X) = λZ 1 − Ip−1 (a, b) − λ,
λ p −1/α
1 − Iv−1 (a, b)

ESp (X) = dv − λ
p 0
for x > 0, 0 < p < 1, a > 0, the first shape parameter, b > 0, the second shape parameter, α > 0,
the third shape parameter, and λ > 0, the scale parameter.

Usage
dbetalomax(x, a=1, b=1, alpha=1, lambda=1, log=FALSE)
pbetalomax(x, a=1, b=1, alpha=1, lambda=1, log.p=FALSE, lower.tail=TRUE)
varbetalomax(p, a=1, b=1, alpha=1, lambda=1, log.p=FALSE, lower.tail=TRUE)
esbetalomax(p, a=1, b=1, alpha=1, lambda=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
lambda the value of the scale parameter, must be positive, the default is 1
a the value of the first scale parameter, must be positive, the default is 1
b the value of the second scale parameter, must be positive, the default is 1
alpha the value of the third scale 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
28 betanorm

Examples
x=runif(10,min=0,max=1)
dbetalomax(x)
pbetalomax(x)
varbetalomax(x)
esbetalomax(x)

betanorm Beta normal distribution

Description
Computes the pdf, cdf, value at risk and expected shortfall for the beta normal distribution due to
Eugene et al. (2002) given by
     
1 x−µ x−µ µ−x
f (x) = φ Φa−1 Φb−1 ,
σB(a, b) σ σ σ
F (x) = IΦ( x−µ ) (a, b),
σ
−1 −1

VaRp (X) = µ + σΦ Ip (a, b) ,
σ p −1 −1
Z

ESp (X) = µ + Φ Iv (a, b) dv
p 0

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
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
betapareto 29

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
x=runif(10,min=0,max=1)
dbetanorm(x)
pbetanorm(x)
varbetanorm(x)
esbetanorm(x)

betapareto Beta Pareto distribution

Description
Computes the pdf, cdf, value at risk and expected shortfall for the beta Pareto distribution due to
Akinsete et al. (2008) given by
 a c−1
aK ad x−ad−1

K
f (x) = 1− ,
B(c, d) x
F (x) = I1−( K )a (c, d),
x
−1/a
VaRp (X) = KZ 1 − Ip−1 (c, d)

,
p
K −1
−1/a
ESp (X) = 1 − Iv (c, d) dv
p 0

for x ≥ K, 0 < p < 1, K > 0, the scale parameter, a > 0, the first shape parameter, c > 0, the
second shape parameter, and d > 0, the third shape parameter.

Usage
dbetapareto(x, K=1, a=1, c=1, d=1, log=FALSE)
pbetapareto(x, K=1, a=1, c=1, d=1, log.p=FALSE, lower.tail=TRUE)
varbetapareto(p, K=1, a=1, c=1, d=1, log.p=FALSE, lower.tail=TRUE)
esbetapareto(p, K=1, a=1, c=1, d=1)
30 betaweibull

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
K 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
c the value of the second shape parameter, must be positive, the default is 1
d the value of the third 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

x=runif(10,min=0,max=1)
dbetapareto(x)
pbetapareto(x)
varbetapareto(x)
esbetapareto(x)

betaweibull Beta Weibull distribution


betaweibull 31

Description
Computes the pdf, cdf, value at risk and expected shortfall for the beta Weibull distribution due to
Cordeiro et al. (2012b) given by

αxα−1 n  x α o h n  x α oia−1
f (x) = exp −b 1 − exp − ,
σ α B(a, b) σ σ
F (x) = I1−exp{−( x )α } (a, b),
 σ   1/α
VaRp (X) = σZ − log 1 − Ip−1 (a, b) ,
σ p  −1
 1/α
ESp (X) = − log 1 − Iv (a, b) dv
p 0
for x > 0, 0 < p < 1, a > 0, the first shape parameter, b > 0, the second shape parameter, α > 0,
the third shape parameter, and σ > 0, the scale parameter.

Usage
dbetaweibull(x, a=1, b=1, alpha=1, sigma=1, log=FALSE)
pbetaweibull(x, a=1, b=1, alpha=1, sigma=1, log.p=FALSE, lower.tail=TRUE)
varbetaweibull(p, a=1, b=1, alpha=1, sigma=1, log.p=FALSE, lower.tail=TRUE)
esbetaweibull(p, a=1, b=1, alpha=1, sigma=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
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
alpha the value of the third 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
32 BS

Examples
x=runif(10,min=0,max=1)
dbetaweibull(x)
pbetaweibull(x)
varbetaweibull(x)
esbetaweibull(x)

BS Birnbaum-Saunders distribution

Description
Computes the pdf, cdf, value at risk and expected shortfall for the Birnbaum-Saunders distribution
due to Birnbaum and Saunders (1969a, 1969b) given by
x1/2 + x−1/2 x − x−1/2
 1/2 
f (x) = φ ,
 2γx γ
x1/2 − x−1/2

F (x) = Φ ,
γ
 2
1
q
−1 2 −1 2
VaRp (X) = γΦ (p) + 4 + γ [Φ (p)] ,
4
Z p 2
1
q
2
ESp (X) = γΦ−1 (v) + 4 + γ 2 [Φ−1 (v)] dv
4p 0
for x > 0, 0 < p < 1, and γ > 0, the scale parameter.

Usage
dBS(x, gamma=1, log=FALSE)
pBS(x, gamma=1, log.p=FALSE, lower.tail=TRUE)
varBS(p, gamma=1, log.p=FALSE, lower.tail=TRUE)
esBS(p, gamma=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
gamma the value of the scale 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.
burr 33

Author(s)
Saralees Nadarajah

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

Examples
x=runif(10,min=0,max=1)
dBS(x)
pBS(x)
varBS(x)
esBS(x)

burr Burr distribution

Description
Computes the pdf, cdf, value at risk and expected shortfall for the Burr distribution due to Burr
(1942) given by
bab h −b
i−2
f (x) = b+1 1 + (x/a) ,
x
1
F (x) = −b
,
1 + (x/a)
VaRp (X) = ap1/b (1 − p)−1/b ,
a
ESp (X) = Bp (1/b + 1, 1 − 1/b)
p
for x > 0, R0 < p < 1, a > 0, the scale parameter, and b > 0, the shape parameter, where
x
Bx (a, b) = 0 ta−1 (1 − t)b−1 dt denotes the incomplete beta function.

Usage
dburr(x, a=1, b=1, log=FALSE)
pburr(x, a=1, b=1, log.p=FALSE, lower.tail=TRUE)
varburr(p, a=1, b=1, log.p=FALSE, lower.tail=TRUE)
esburr(p, 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
a the value of the scale parameter, must be positive, the default is 1
b the value of the shape parameter, must be positive, the default is 1
34 burr7

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
x=runif(10,min=0,max=1)
dburr(x)
pburr(x)
varburr(x)
esburr(x)

burr7 Burr XII distribution

Description
Computes the pdf, cdf, value at risk and expected shortfall for the Burr XII distribution due to Burr
(1942) given by
kcxc−1
f (x) = k+1
,
(1 + xc )
−k
F (x) = 1 − (1 + xc ) ,
h i1/c
VaRp (X) = (1 − p)−1/k − 1 ,
Z ph i1/c
1
ESp (X) = (1 − v)−1/k − 1 dv
p 0
for x > 0, 0 < p < 1, c > 0, the first shape parameter, and k > 0, the second shape parameter.

Usage
dburr7(x, k=1, c=1, log=FALSE)
pburr7(x, k=1, c=1, log.p=FALSE, lower.tail=TRUE)
varburr7(p, k=1, c=1, log.p=FALSE, lower.tail=TRUE)
esburr7(p, k=1, c=1)
Cauchy 35

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
k the value of the first shape parameter, must be positive, the default is 1
c 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
x=runif(10,min=0,max=1)
dburr7(x)
pburr7(x)
varburr7(x)
esburr7(x)

Cauchy Cauchy distribution

Description
Computes the pdf, cdf, value at risk and expected shortfall for the Cauchy distribution given by
1 σ
f (x) = ,
π (x − µ)2 + σ2 
1 1 x−µ
F (x) = + arctan ,
2 π   σ 
1
VaRp (X) = µ + σ tan π p − ,
Z p   2 
σ 1
ESp (X) = µ + tan π v − dv
p 0 2
36 Cauchy

for −∞ < x < ∞, 0 < p < 1, −∞ < µ < ∞, the location parameter, and σ > 0, the scale
parameter.

Usage

dCauchy(x, mu=0, sigma=1, log=FALSE)


pCauchy(x, mu=0, sigma=1, log.p=FALSE, lower.tail=TRUE)
varCauchy(p, mu=0, sigma=1, log.p=FALSE, lower.tail=TRUE)
esCauchy(p, mu=0, sigma=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
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
x=runif(10,min=0,max=1)
dCauchy(x)
pCauchy(x)
varCauchy(x)
esCauchy(x)
chen 37

chen Chen distribution

Description
Computes the pdf, cdf, value at risk and expected shortfall for the Chen distribution due to Chen
(2000) given by
f (x) = λbxb−1 exp b
− λ exp xb ,
  
 x exp λb 
F (x) = 1 − exp λ − λ exp x ,
  1/b
log(1 − p)
VaRp (X) = log 1 − ,
λ
Z p  1/b
1 log(1 − v)
ESp (X) = log 1 − dv
p 0 λ
for x > 0, 0 < p < 1, b > 0, the shape parameter, and λ > 0, the scale parameter.

Usage
dchen(x, b=1, lambda=1, log=FALSE)
pchen(x, b=1, lambda=1, log.p=FALSE, lower.tail=TRUE)
varchen(p, b=1, lambda=1, log.p=FALSE, lower.tail=TRUE)
eschen(p, b=1, lambda=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
lambda the value of the scale parameter, must be positive, the default is 1
b the value of the 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
38 clg

Examples
x=runif(10,min=0,max=1)
dchen(x)
pchen(x)
varchen(x)
eschen(x)

clg Compound Laplace gamma distribution

Description
Computes the pdf, cdf, value at risk and expected shortfall for the compound Laplace gamma dis-
tribution given by

ab −(a+1)
f (x) = {1 + b |x − θ|} ,
2
 1
−a
 2 {1 + b |x − θ|} , if x ≤ θ,


F (x) =
 1 − 1 {1 + b |x − θ|}−a , if x > θ,


 2
1 (2p)−1/a
 θ− b − , if p ≤ 1/2,


b

VaRp (X) =
−1/a
 θ − 1 + (2(1 − p))



, if p > 1/2,
b b
−1/a

1 (2p)

 θ− − , if p ≤ 1/2,
b b(1 − 1/a)



ESp (X) =
1−1/a
1 [2(1 − p)]



 θ− −
 , if p > 1/2
b 2pb(1 − 1/a)

for −∞ < x < ∞, 0 < p < 1, −∞ < θ < ∞, the location parameter, b > 0, the scale parameter,
and a > 0, the shape parameter.

Usage
dclg(x, a=1, b=1, theta=0, log=FALSE)
pclg(x, a=1, b=1, theta=0, log.p=FALSE, lower.tail=TRUE)
varclg(p, a=1, b=1, theta=0, log.p=FALSE, lower.tail=TRUE)
esclg(p, a=1, b=1, theta=0)

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
compbeta 39

theta the value of the location parameter, can take any real value, the default is zero
b the value of the scale parameter, must be positive, the default is 1
a the value of the 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
x=runif(10,min=0,max=1)
dclg(x)
pclg(x)
varclg(x)
esclg(x)

compbeta Complementary beta distribution

Description
Computes the pdf, cdf, value at risk and expected shortfall for the complementary beta distribution
due to Jones (2002) given by
1−a  1−b
f (x) = B(a, b) Ix−1 (a, b) 1 − Ix−1 (a, b)

,
F (x) = Ix−1 (a, b),
VaRp (X) = IZp (a, b),
1 p
ESp (X) = Iv (a, b)dv
p 0

for 0 < x < 1, 0 < p < 1, a > 0, the first shape parameter, and b > 0, the second shape parameter.
40 compbeta

Usage

dcompbeta(x, a=1, b=1, log=FALSE)


pcompbeta(x, a=1, b=1, log.p=FALSE, lower.tail=TRUE)
varcompbeta(p, a=1, b=1, log.p=FALSE, lower.tail=TRUE)
escompbeta(p, 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
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

x=runif(10,min=0,max=1)
dcompbeta(x)
pcompbeta(x)
varcompbeta(x)
escompbeta(x)
dagum 41

dagum Dagum distribution

Description
Computes the pdf, cdf, value at risk and expected shortfall for the Dagum distribution due to Dagum
(1975, 1977, 1980) given by

acba xac−1
f (x) = c+1 ,
[xa + ba ]
  a −c
b
F (x) = 1 + ,
x
 −1/a
VaRp (X) = b 1 − p−1/c ,
b p −1/a
Z
ESp (X) = 1 − v −1/c dv
p 0

for x > 0, 0 < p < 1, a > 0, the first shape parameter, b > 0, the scale parameter, and c > 0, the
second shape parameter.

Usage
ddagum(x, a=1, b=1, c=1, log=FALSE)
pdagum(x, a=1, b=1, c=1, log.p=FALSE, lower.tail=TRUE)
vardagum(p, a=1, b=1, c=1, log.p=FALSE, lower.tail=TRUE)
esdagum(p, a=1, b=1, c=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
b 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
c 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.
42 dweibull

Author(s)

Saralees Nadarajah

References

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

Examples
x=runif(10,min=0,max=1)
ddagum(x)
pdagum(x)
vardagum(x)
esdagum(x)

dweibull Double Weibull distribution

Description

Computes the pdf, cdf, value at risk and expected shortfall for the double Weibull distribution due
to Balakrishnan and Kocherlakota (1985) given by

x − µ c−1 x − µ c
 
c
f (x) = exp − ,


σ
  c  σ

1 µ−x
exp − , if x ≤ µ,


2 σ



F (x) =   c 
1 x−µ


 1 − exp − , if x > µ,


 2 σ
1/c
 µ − σ [− log (2p)] , if p ≤ 1/2,
VaRp (X) =
 1/c
 µ + σZ[−p log (2(1 − p))] , if p > 1/2,
σ 1/c
 µ − p 0 [− log 2 − log v] dv, if p ≤ 1/2,








σ 1/2
Z
ESp (X) = 1/c
 µ− [− log 2 − log v] dv

 p Z0
σ p


 1/c
+ [− log 2 − log(1 − v)] dv, if p > 1/2


p 1/2

for −∞ < x < ∞, 0 < p < 1, −∞ < µ < ∞, the location parameter, σ > 0, the scale parameter,
and c > 0, the shape parameter.
dweibull 43

Usage

ddweibull(x, c=1, mu=0, sigma=1, log=FALSE)


pdweibull(x, c=1, mu=0, sigma=1, log.p=FALSE, lower.tail=TRUE)
vardweibull(p, c=1, mu=0, sigma=1, log.p=FALSE, lower.tail=TRUE)
esdweibull(p, c=1, mu=0, sigma=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
c the value of the 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

x=runif(10,min=0,max=1)
ddweibull(x)
pdweibull(x)
vardweibull(x)
esdweibull(x)
44 expexp

expexp Exponentiated exponential distribution

Description
Computes the pdf, cdf, value at risk and expected shortfall for the exponentiated exponential distri-
bution due to Gupta and Kundu (1999, 2001) given by
a−1
f (x) = aλ exp(−λx) [1 − exp(−λx)] ,
a
F (x) = [1 − exp(−λx)] ,
1  
VaRp (X) = − log 1 − p1/a ,
λZ p
1  
ESp (X) = − log 1 − v 1/a dv
pλ 0
for x > 0, 0 < p < 1, a > 0, the shape parameter and λ > 0, the scale parameter.

Usage
dexpexp(x, lambda=1, a=1, log=FALSE)
pexpexp(x, lambda=1, a=1, log.p=FALSE, lower.tail=TRUE)
varexpexp(p, lambda=1, a=1, log.p=FALSE, lower.tail=TRUE)
esexpexp(p, lambda=1, a=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
lambda the value of the scale parameter, must be positive, the default is 1
a the value of the 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
expext 45

Examples
x=runif(10,min=0,max=1)
dexpexp(x)
pexpexp(x)
varexpexp(x)
esexpexp(x)

expext Exponential extension distribution

Description
Computes the pdf, cdf, value at risk and expected shortfall for the exponential extension distribution
due to Nadarajah and Haghighi (2011) given by

f (x) = aλ(1 + λx)a−1 exp [1 − (1 + λx)a ] ,


F (x) = 1 − exp [1 − (1 + λx)a ] ,
1/a
[1 − log(1 − p)] −1
VaRp (X) = ,
Z λ
p
1 1 1/a
ESp (X) = − + [1 − log(1 − v)] dv
λ λp 0
for x > 0, 0 < p < 1, a > 0, the shape parameter and λ > 0, the scale parameter.

Usage
dexpext(x, lambda=1, a=1, log=FALSE)
pexpext(x, lambda=1, a=1, log.p=FALSE, lower.tail=TRUE)
varexpext(p, lambda=1, a=1, log.p=FALSE, lower.tail=TRUE)
esexpext(p, lambda=1, a=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
lambda the value of the scale parameter, must be positive, the default is 1
a the value of the 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.
46 expgeo

Author(s)
Saralees Nadarajah

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

Examples
x=runif(10,min=0,max=1)
dexpext(x)
pexpext(x)
varexpext(x)
esexpext(x)

expgeo Exponential geometric distribution

Description
Computes the pdf, cdf, value at risk and expected shortfall for the exponential geometric distribution
due to Adamidis and Loukas (1998) given by

λθ exp(−λx)
f (x) = 2,
[1 − (1 − θ) exp(−λx)]
θ exp(−λx)
F (x) = ,
1 − (1 − θ) exp(−λx)
1 p
VaRp (X) = − log ,
λ θ + (1 − θ)p
log p θ log θ θ + (1 − θ)p
ESp (X) = − − + log [θ + (1 − θ)p]
λ λp(1 − θ) λp(1 − θ)

for x > 0, 0 < p < 1, 0 < θ < 1, the first scale parameter, and λ > 0, the second scale parameter.

Usage
dexpgeo(x, theta=0.5, lambda=1, log=FALSE)
pexpgeo(x, theta=0.5, lambda=1, log.p=FALSE, lower.tail=TRUE)
varexpgeo(p, theta=0.5, lambda=1, log.p=FALSE, lower.tail=TRUE)
esexpgeo(p, theta=0.5, lambda=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
explog 47

theta the value of the first scale parameter, must be in the unit interval, the default is
0.5
lambda the value of the second scale 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
x=runif(10,min=0,max=1)
dexpgeo(x)
pexpgeo(x)
varexpgeo(x)
esexpgeo(x)

explog Exponential logarithmic distribution

Description
Computes the pdf, cdf, value at risk and expected shortfall for the exponential logarithmic distribu-
tion due to Tahmasbi and Rezaei (2008) given by

b(1 − a) exp(−bx)
f (x) = − ,
log a [1 − (1 − a) exp(−bx)]
log [1 − (1 − a) exp(−bx)]
F (x) = 1 − ,
 log a1−p 
1 1−a
VaRp (X) = − log ,
bZ 1 − a
p
1 − a1−v

1
ESp (X) = − log dv
bp 0 1−a

for x > 0, 0 < p < 1, 0 < a < 1, the first scale parameter, and b > 0, the second scale parameter.
48 explog

Usage

dexplog(x, a=0.5, b=1, log=FALSE)


pexplog(x, a=0.5, b=1, log.p=FALSE, lower.tail=TRUE)
varexplog(p, a=0.5, b=1, log.p=FALSE, lower.tail=TRUE)
esexplog(p, a=0.5, 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
a the value of the first scale parameter, must be in the unit interval, the default is
0.5
b the value of the second scale 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

x=runif(10,min=0,max=1)
dexplog(x)
pexplog(x)
varexplog(x)
esexplog(x)
explogis 49

explogis Exponentiated logistic distribution

Description
Computes the pdf, cdf, value at risk and expected shortfall for the exponentiated logistic distribution
given by
−a−1
f (x) = (a/b) exp(−x/b) [1 + exp(−x/b)] ,
−a
F (x) = [1 + exp(−x/b)]
h , i
VaRp (X) = −b log p−1/a − 1 ,
b p
Z h i
ESp (X) = − log v −1/a − 1 dv
p 0
for −∞ < x < ∞, 0 < p < 1, a > 0, the shape parameter, and b > 0, the scale parameter.

Usage
dexplogis(x, a=1, b=1, log=FALSE)
pexplogis(x, a=1, b=1, log.p=FALSE, lower.tail=TRUE)
varexplogis(p, a=1, b=1, log.p=FALSE, lower.tail=TRUE)
esexplogis(p, 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
b the value of the scale parameter, must be positive, the default is 1
a the value of the 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
50 exponential

Examples
x=runif(10,min=0,max=1)
dexplogis(x)
pexplogis(x)
varexplogis(x)
esexplogis(x)

exponential Exponential distribution

Description
Computes the pdf, cdf, value at risk and expected shortfall for the exponential distribution given by
f (x) = λ exp(−λx),
F (x) = 1 − exp(−λx),
1
VaRp (X) = − log(1 − p),
λ
1
ESp (X) = − {log(1 − p)p − p − log(1 − p)}

for x > 0, 0 < p < 1, and λ > 0, the scale parameter.

Usage
dexponential(x, lambda=1, log=FALSE)
pexponential(x, lambda=1, log.p=FALSE, lower.tail=TRUE)
varexponential(p, lambda=1, log.p=FALSE, lower.tail=TRUE)
esexponential(p, lambda=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
lambda the value of the scale 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
exppois 51

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

Examples
x=runif(10,min=0,max=1)
dexponential(x)
pexponential(x)
varexponential(x)
esexponential(x)

exppois Exponential Poisson distribution

Description
Computes the pdf, cdf, value at risk and expected shortfall for the exponential Poisson distribution
due to Kus (2007) given by
bλ exp [−bx − λ + λ exp(−bx)]
f (x) = ,
1 − exp(−λ)
1 − exp [−λ + λ exp(−bx)]
F (x) = ,
1 − exp(−λ)
 
1 1
VaRp (X) = − log log [1 − p + p exp(−λ)] + 1 ,
bZ λ
p 
1 1
ESp (X) = − log log [1 − v + v exp(−λ)] + 1 dv
bp 0 λ
for x > 0, 0 < p < 1, b > 0, the first scale parameter, and λ > 0, the second scale parameter.

Usage
dexppois(x, b=1, lambda=1, log=FALSE)
pexppois(x, b=1, lambda=1, log.p=FALSE, lower.tail=TRUE)
varexppois(p, b=1, lambda=1, log.p=FALSE, lower.tail=TRUE)
esexppois(p, b=1, lambda=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
b the value of the first scale parameter, must be positive, the default is 1
lambda the value of the second scale 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
52 exppower

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
x=runif(10,min=0,max=1)
dexppois(x)
pexppois(x)
varexppois(x)
esexppois(x)

exppower Exponential power distribution

Description
Computes the pdf, cdf, value at risk and expected shortfall for the exponential power distribution
due to Subbotin (1923) given by
| x − µ |a
 
1
f (x) = 1/a exp − ,
2a
 σΓ(1 + 1/a) a  aσ a
1 1 (µ − x)
 2 Q a , aσ a , if x ≤ µ,




F (x) =
1 (x − µ)a
 

 1
 1− Q , , if x > µ,


 2 a aσ a
  1/a
 1/a −1 1
µ − a σ Q , 2p , if p ≤ 1/2,


a

VaRp (X) =

 1/a
µ + a1/a σ Q−1 a1 , 2(1 − p)
 
, if p > 1/2,


1/a Z p    1/a
a σ 1
µ− Q−1 , 2v dv, if p ≤ 1/2,






 p 0 a


 1/a
a1/a σ 1/2
Z  
ESp (X) = −1 1
 µ − Q , 2v dv


 p 0 a
1/a
a1/a σ p
 Z  
1


 + Q−1 , 2(1 − v) dv, if p > 1/2


p 1/2 a
exppower 53

for −∞ < x < ∞, 0 < p < 1, −∞ < µ < ∞, the location parameter, σ > 0, the scale parameter,
and a > 0, the shape parameter.

Usage
dexppower(x, mu=0, sigma=1, a=1, log=FALSE)
pexppower(x, mu=0, sigma=1, a=1, log.p=FALSE, lower.tail=TRUE)
varexppower(p, mu=0, sigma=1, a=1, log.p=FALSE, lower.tail=TRUE)
esexppower(p, mu=0, sigma=1, a=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 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
x=runif(10,min=0,max=1)
dexppower(x)
pexppower(x)
varexppower(x)
esexppower(x)
54 expweibull

expweibull Exponentiated Weibull distribution

Description
Computes the pdf, cdf, value at risk and expected shortfall for the exponentiated Weibull distribution
due to Mudholkar and Srivastava (1993) and Mudholkar et al. (1995) given by
a−1
f (x) = aασ −α xα−1 exp [−(x/σ)α ] {1 − exp [−(x/σ)α ]} ,
a
F (x) = {1 − exp [−(x/σ)α ]} ,
h  i1/α
VaRp (X) = σ − log 1 − p1/a ,
σ ph
Z  i1/α
ESp (X) = − log 1 − v 1/a dv
p 0

for x > 0, 0 < p < 1, a > 0, the first shape parameter, α > 0, the second shape parameter, and
σ > 0, the scale parameter.

Usage
dexpweibull(x, a=1, alpha=1, sigma=1, log=FALSE)
pexpweibull(x, a=1, alpha=1, sigma=1, log.p=FALSE, lower.tail=TRUE)
varexpweibull(p, a=1, alpha=1, sigma=1, log.p=FALSE, lower.tail=TRUE)
esexpweibull(p, a=1, alpha=1, sigma=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
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
alpha 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
F 55

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

Examples
x=runif(10,min=0,max=1)
dexpweibull(x)
pexpweibull(x)
varexpweibull(x)
esexpweibull(x)

F F distribution

Description
Computes the pdf, cdf, value at risk and expected shortfall for the F distribution given by
  d1  − d1 +d2
1 d1 2 d1 −1 d1 2
f (x) = x 2 1+ x ,
B d21 , d2

2 d2  d2
d1 d2
F (x) = I d1 x , ,
d1 x+d2 2 2
d d
d2 Ip−1 21 , 22

VaRp (X) = ,
d1 1 − Ip−1 d21 , d22
Iv−1 d21 , d22
Z p 
d2
ESp (X) =  dv
d1 p 0 1 − Iv−1 d21 , d22

for x ≥ K, 0 < p < 1, d1 > 0, the first degree of freedom parameter, and d2 > 0, the second
degree of freedom parameter.

Usage
dF(x, d1=1, d2=1, log=FALSE)
pF(x, d1=1, d2=1, log.p=FALSE, lower.tail=TRUE)
varF(p, d1=1, d2=1, log.p=FALSE, lower.tail=TRUE)
esF(p, d1=1, d2=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
d1 the value of the first degree of freedom parameter, must be positive, the default
is 1
56 FR

d2 the value of the second degree of freedom parameter, must be positive, the de-
fault 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
x=runif(10,min=0,max=1)
dF(x)
pF(x)
varF(x)
esF(x)

FR Freimer distribution

Description
Computes the pdf, cdf, value at risk and expected shortfall for the Freimer distribution due to
Freimer et al. (1988) given by

1 pb − 1 (1 − p)c − 1
 
VaRp (X) = − ,
a b  c
1 1 1 pb (1 − p)c+1 − 1
ESp (X) = − + +
a c b ab(b + 1) pac(c + 1)

for 0 < p < 1, a > 0, the scale parameter, b > 0, the first shape parameter, and c > 0, the second
shape parameter.

Usage
varFR(p, a=1, b=1, c=1, log.p=FALSE, lower.tail=TRUE)
esFR(p, a=1, b=1, c=1)
frechet 57

Arguments
p scaler or vector of values at which the value at risk or expected shortfall needs
to be computed
a the value of the scale parameter, must be positive, the default is 1
b the value of the first shape parameter, must be positive, the default is 1
c 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
x=runif(10,min=0,max=1)
varFR(x)
esFR(x)

frechet Frechet distribution

Description
Computes the pdf, cdf, value at risk and expected shortfall for the Fr\’echet distribution due to
Fr\’echet (1927) given by
ασ α n  σ α o
f (x) = α+1 exp − ,
x n  α ox
σ
F (x) = exp − ,
x
−1/α
VaRp (X) = σ [− log p] ,
σ
ESp (X) = Γ (1 − 1/α, − log p)
p
for x > 0,R 0 < p < 1, α > 0, the shape parameter, and σ > 0, the scale parameter, where

Γ(a, x) = x ta−1 exp (−t) dt denotes the complementary incomplete gamma function.
58 frechet

Usage

dfrechet(x, alpha=1, sigma=1, log=FALSE)


pfrechet(x, alpha=1, sigma=1, log.p=FALSE, lower.tail=TRUE)
varfrechet(p, alpha=1, sigma=1, log.p=FALSE, lower.tail=TRUE)
esfrechet(p, alpha=1, sigma=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
sigma the value of the scale parameter, must be positive, the default is 1
alpha the value of the 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

x=runif(10,min=0,max=1)
dfrechet(x)
pfrechet(x)
varfrechet(x)
esfrechet(x)
Gamma 59

Gamma Gamma distribution

Description
Computes the pdf, cdf, value at risk and expected shortfall for the gamma distribution given by
ba xa−1 exp(−bx)
f (x) = ,
Γ(a)
γ(a, bx)
F (x) = ,
Γ(a)
1
VaRp (X) = Q−1 (a, 1 − p),
bZ p
1
ESp (X) = Q−1 (a, 1 − v)dv
bp 0

R x xa−1
for > 0, 0 < p < 1, b > 0, the scale parameter, and a > 0, the shape parameter,
R ∞ a−1 where γ(a, x) =
0
t exp (−t) dt denotes the incomplete gamma function, Q(a, x) = x
t exp (−t) dt/Γ(a)
R∞
denotes the regularized complementary incomplete gamma function, Γ(a) = 0 ta−1 exp (−t) dt
denotes the gamma function, and Q−1 (a, x) denotes the inverse of Q(a, x).

Usage
dGamma(x, a=1, b=1, log=FALSE)
pGamma(x, a=1, b=1, log.p=FALSE, lower.tail=TRUE)
varGamma(p, a=1, b=1, log.p=FALSE, lower.tail=TRUE)
esGamma(p, 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
b the value of the scale parameter, must be positive, the default is 1
a the value of the 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
60 genbeta

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

Examples
x=runif(10,min=0,max=1)
dGamma(x)
pGamma(x)
varGamma(x)
esGamma(x)

genbeta Generalized beta distribution

Description
Computes the pdf, cdf, value at risk and expected shortfall for the generalized beta distribution
given by
(x − c)a−1 (d − x)b−1
f (x) = ,
B(a, b)(d − c)a+b−1
F (x) = I x−c (a, b),
d−c
VaRp (X) = c + (d −Zc)Ip−1 (a, b),
d − c p −1
ESp (X) = c + Iv (a, b)dv
p 0

for c ≤ x ≤ d, 0 < p < 1, a > 0, the first shape parameter, b > 0, the second shape parameter,
−∞ < c < ∞, the first location parameter, and −∞ < c < d < ∞, the second location parameter.

Usage
dgenbeta(x, a=1, b=1, c=0, d=1, log=FALSE)
pgenbeta(x, a=1, b=1, c=0, d=1, log.p=FALSE, lower.tail=TRUE)
vargenbeta(p, a=1, b=1, c=0, d=1, log.p=FALSE, lower.tail=TRUE)
esgenbeta(p, a=1, b=1, c=0, d=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
c the value of the first location parameter, can take any real value, the default is
zero
d the value of the second location parameter, can take any real value but must be
greater than c, the default is 1
a the value of the first shape parameter, must be positive, the default is 1
genbeta2 61

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
x=runif(10,min=0,max=1)
dgenbeta(x)
pgenbeta(x)
vargenbeta(x)
esgenbeta(x)

genbeta2 Generalized beta II distribution

Description

Computes the pdf, cdf, value at risk and expected shortfall for the generalized beta II distribution
given by
b−1
cxac−1 (1 − xc )
f (x) = ,
B(a, b)
F (x) = Ixc (a, b),
1/c
VaRp (X) = ZIp−1 (a, b)

,
1 p  −1 1/c
ESp (X) = Iv (a, b) dv
p 0
for 0 < x < 1, 0 < p < 1, a > 0, the first shape parameter, b > 0, the second shape parameter, and
c > 0, the third shape parameter.
62 genbeta2

Usage

dgenbeta2(x, a=1, b=1, c=1, log=FALSE)


pgenbeta2(x, a=1, b=1, c=1, log.p=FALSE, lower.tail=TRUE)
vargenbeta2(p, a=1, b=1, c=1, log.p=FALSE, lower.tail=TRUE)
esgenbeta2(p, a=1, b=1, c=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
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
c the value of the third 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

x=runif(10,min=0,max=1)
dgenbeta2(x)
pgenbeta2(x)
vargenbeta2(x)
esgenbeta2(x)
geninvbeta 63

geninvbeta Generalized inverse beta distribution

Description
Computes the pdf, cdf, value at risk and expected shortfall for the generalized inverse beta distribu-
tion given by
axac−1
f (x) = c+d
,
B(c, d) (1 + xa )
F (x) = I xa a (c, d),
1+x
" #1/a
Ip−1 (c, d)
VaRp (X) = ,
1 − Ip−1 (c, d)
1/a
1 p
Z  −1
Iv (c, d)
ESp (X) = dv
p 0 1 − Iv−1 (c, d)
for x > 0, 0 < p < 1, a > 0, the first shape parameter, c > 0, the second shape parameter, and
d > 0, the third shape parameter.

Usage
dgeninvbeta(x, a=1, c=1, d=1, log=FALSE)
pgeninvbeta(x, a=1, c=1, d=1, log.p=FALSE, lower.tail=TRUE)
vargeninvbeta(p, a=1, c=1, d=1, log.p=FALSE, lower.tail=TRUE)
esgeninvbeta(p, a=1, c=1, d=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
a the value of the first shape parameter, must be positive, the default is 1
c the value of the second shape parameter, must be positive, the default is 1
d 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
64 genlogis

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

Examples
x=runif(10,min=0,max=1)
dgeninvbeta(x)
pgeninvbeta(x)
vargeninvbeta(x)
esgeninvbeta(x)

genlogis Generalized logistic distribution

Description
Computes the pdf, cdf, value at risk and expected shortfall for the generalized logistic distribution
given by
a exp − x−µ

σ
f (x) =   1+a ,
σ 1 + exp − x−µ σ
1
F (x) =   a ,
1 + exp − x−µσ
 
VaRp (X) = µ − σ log p−1/a − 1 ,
σ p
Z  
ESp (X) = µ − log v −1/a − 1 dv
p 0
for −∞ < x < ∞, 0 < p < 1, −∞ < µ < ∞, the location parameter, σ > 0, the scale parameter,
and a > 0, the shape parameter.

Usage
dgenlogis(x, a=1, mu=0, sigma=1, log=FALSE)
pgenlogis(x, a=1, mu=0, sigma=1, log.p=FALSE, lower.tail=TRUE)
vargenlogis(p, a=1, mu=0, sigma=1, log.p=FALSE, lower.tail=TRUE)
esgenlogis(p, a=1, mu=0, sigma=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 shape parameter, must be positive, the default is 1
genlogis3 65

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
x=runif(10,min=0,max=1)
dgenlogis(x)
pgenlogis(x)
vargenlogis(x)
esgenlogis(x)

genlogis3 Generalized logistic III distribution

Description

Computes the pdf, cdf, value at risk and expected shortfall for the generalized logistic III distribution
given by
   −2α
1 x−µ x−µ
f (x) = exp α 1 + exp ,
σB(α, α) σ σ
F (x) = I 1
x−µ
(α, α),
1+exp(−
σ )
1 − Ip−1 (α, α)
VaRp (X) = µ − σ log −1 ,
Z p Ip (α,−1 α)
σ 1 − Iv (α, α)
ESp (X) = µ − log dv
p 0 Iv−1 (α, α)
for −∞ < x < ∞, 0 < p < 1, −∞ < µ < ∞, the location parameter, σ > 0, the scale parameter,
and α > 0, the shape parameter.
66 genlogis3

Usage

dgenlogis3(x, alpha=1, mu=0, sigma=1, log=FALSE)


pgenlogis3(x, alpha=1, mu=0, sigma=1, log.p=FALSE, lower.tail=TRUE)
vargenlogis3(p, alpha=1, mu=0, sigma=1, log.p=FALSE, lower.tail=TRUE)
esgenlogis3(p, alpha=1, mu=0, sigma=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
alpha the value of the 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

x=runif(10,min=0,max=1)
dgenlogis3(x)
pgenlogis3(x)
vargenlogis3(x)
esgenlogis3(x)
genlogis4 67

genlogis4 Generalized logistic IV distribution

Description
Computes the pdf, cdf, value at risk and expected shortfall for the generalized logistic IV distribution
given by
   −α−a
1 x−µ x−µ
f (x) = exp −α 1 + exp − ,
σB(α, a) σ σ
F (x) = I 1
x−µ
(α, a),
1+exp(−
σ )
1 − Ip−1 (α, a)
VaRp (X) = µ − σ log −1 ,
Z p Ip (α,−1 a)
σ 1 − Iv (α, a)
ESp (X) = µ − log dv
p 0 Iv−1 (α, a)

for −∞ < x < ∞, 0 < p < 1, −∞ < µ < ∞, the location parameter, σ > 0, the scale parameter,
α > 0, the first shape parameter, and a > 0, the second shape parameter.

Usage
dgenlogis4(x, a=1, alpha=1, mu=0, sigma=1, log=FALSE)
pgenlogis4(x, a=1, alpha=1, mu=0, sigma=1, log.p=FALSE, lower.tail=TRUE)
vargenlogis4(p, a=1, alpha=1, mu=0, sigma=1, log.p=FALSE, lower.tail=TRUE)
esgenlogis4(p, a=1, alpha=1, mu=0, sigma=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
alpha the value of the first shape parameter, must be positive, the default is 1
a 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.
68 genpareto

Author(s)
Saralees Nadarajah

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

Examples
x=runif(10,min=0,max=1)
dgenlogis4(x)
pgenlogis4(x)
vargenlogis4(x)
esgenlogis4(x)

genpareto Generalized Pareto distribution

Description
Computes the pdf, cdf, value at risk and expected shortfall for the generalized Pareto distribution
due to Pickands (1975) given by

1 cx 1/c−1
f (x) = 1− ,
k  k 
cx 1/c
F (x) = 1 − 1 − ,
k
k
VaRp (X) = [1 − (1 − p)c ] ,
c
k k(1 − p)c+1 k
ESp (X) = + −
c pc(c + 1) pc(c + 1)

for x < k/c if c > 0, x > k/c if c < 0, x > 0 if c = 0, 0 < p < 1, k > 0, the scale parameter and
−∞ < c < ∞, the shape parameter.

Usage
dgenpareto(x, k=1, c=1, log=FALSE)
pgenpareto(x, k=1, c=1, log.p=FALSE, lower.tail=TRUE)
vargenpareto(p, k=1, c=1, log.p=FALSE, lower.tail=TRUE)
esgenpareto(p, k=1, c=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
genpowerweibull 69

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


c the value of the shape parameter, can take any real value, 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
x=runif(10,min=0,max=1)
dgenpareto(x)
pgenpareto(x)
vargenpareto(x)
esgenpareto(x)

genpowerweibull Generalized power Weibull distribution

Description
Computes the pdf, cdf, value at risk and expected shortfall for the generalized power Weibull dis-
tribution due to Nikulin and Haghighi (2006) given by
n o
θ−1 θ
f (x) = aθxa−1 [1 + xa ] exp 1 − [1 + xa ] ,
n o
θ
F (x) = 1 − exp 1 − [1 + xa ] ,
n o1/a
1/θ
VaRp (X) = [1 − log(1 − p)] − 1 ,
1 pn
Z o1/a
1/θ
ESp (X) = [1 − log(1 − v)] − 1 dv
p 0

for x > 0, 0 < p < 1, a > 0, the first shape parameter, and θ > 0, the second shape parameter.
70 genpowerweibull

Usage

dgenpowerweibull(x, a=1, theta=1, log=FALSE)


pgenpowerweibull(x, a=1, theta=1, log.p=FALSE, lower.tail=TRUE)
vargenpowerweibull(p, a=1, theta=1, log.p=FALSE, lower.tail=TRUE)
esgenpowerweibull(p, a=1, theta=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
a the value of the first shape parameter, must be positive, the default is 1
theta 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

x=runif(10,min=0,max=1)
dgenpowerweibull(x)
pgenpowerweibull(x)
vargenpowerweibull(x)
esgenpowerweibull(x)
genunif 71

genunif Generalized uniform distribution

Description
Computes the pdf, cdf, value at risk and expected shortfall for the generalized uniform distribution
given by
h−1
f (x) = hkc(x − a)c−1 [1 − k(x − a)c ] ,
c h
F (x) = 1 − [1 − k(x − a) ] ,
h i1/c
VaRp (X) = a + k −1/c 1 − (1 − p)1/h ,
−1/c Z p h 1/c
k i
ESp (X) = a + 1 − (1 − v)1/h dv
p 0

for a ≤ x ≤ a + k −1/c , 0 < p < 1, −∞ < a < ∞, the location parameter, c > 0, the first shape
parameter, k > 0, the scale parameter, and h > 0, the second shape parameter.

Usage
dgenunif(x, a=0, c=1, h=1, k=1, log=FALSE)
pgenunif(x, a=0, c=1, h=1, k=1, log.p=FALSE, lower.tail=TRUE)
vargenunif(p, a=0, c=1, h=1, k=1, log.p=FALSE, lower.tail=TRUE)
esgenunif(p, a=0, c=1, h=1, k=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
a the value of the location parameter, can take any real value, the default is zero
k the value of the scale parameter, must be positive, the default is 1
c the value of the first scale parameter, must be positive, the default is 1
h the value of the second scale 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
72 gev

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

Examples
x=runif(10,min=0,max=1)
dgenunif(x)
pgenunif(x)
vargenunif(x)
esgenunif(x)

gev Generalized extreme value distribution

Description
Computes the pdf, cdf, value at risk and expected shortfall for the generalized extreme value distri-
bution due to Fisher and Tippett (1928) given by
  −1/ξ−1 (   −1/ξ )
1 x−µ x−µ
f (x) = 1+ξ exp − 1 + ξ ,
σ σ σ
(   −1/ξ )
x−µ
F (x) = exp − 1 + ξ ,
σ
σ σ
VaRp (X) = µ − + (− log p)−ξ ,
ξ ξZ p
σ σ
ESp (X) = µ − + (− log v)−ξ dv
ξ pξ 0

for x ≥ µ − σ/ξ if ξ > 0, x ≤ µ − σ/ξ if ξ < 0, −∞ < x < ∞ if ξ = 0, 0 < p < 1,


−∞ < µ < ∞, the location parameter, σ > 0, the scale parameter, and −∞ < ξ < ∞, the shape
parameter.

Usage
dgev(x, mu=0, sigma=1, xi=1, log=FALSE)
pgev(x, mu=0, sigma=1, xi=1, log.p=FALSE, lower.tail=TRUE)
vargev(p, mu=0, sigma=1, xi=1, log.p=FALSE, lower.tail=TRUE)
esgev(p, mu=0, sigma=1, xi=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
gompertz 73

sigma the value of the scale parameter, must be positive, the default is 1
xi the value of the 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
x=runif(10,min=0,max=1)
dgev(x)
pgev(x)
vargev(x)
esgev(x)

gompertz Gompertz distribution

Description
Computes the pdf, cdf, value at risk and expected shortfall for the Gompertz distribution due to
Gompertz (1825) given by

f (x) = bη exp(bx) exp [η − η exp(bx)] ,


F (x) = 1 − exp [η − η exp(bx)] , 
1 1
VaRp (X) = log 1 − log(1 − p) ,
bZ  η
p 
1 1
ESp (X) = log 1 − log(1 − v) dv
pb 0 η

for x > 0, 0 < p < 1, b > 0, the first scale parameter and η > 0, the second scale parameter.
74 gompertz

Usage

dgompertz(x, b=1, eta=1, log=FALSE)


pgompertz(x, b=1, eta=1, log.p=FALSE, lower.tail=TRUE)
vargompertz(p, b=1, eta=1, log.p=FALSE, lower.tail=TRUE)
esgompertz(p, b=1, eta=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
b the value of the first scale parameter, must be positive, the default is 1
eta the value of the second scale 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

x=runif(10,min=0,max=1)
dgompertz(x)
pgompertz(x)
vargompertz(x)
esgompertz(x)
gumbel 75

gumbel Gumbel distribution

Description
Computes the pdf, cdf, value at risk and expected shortfall for the Gumbel distribution given by due
to Gumbel (1954) given by
    
1 µ−x µ−x
f (x) = exp exp − exp ,
σ  σ  σ
µ−x
F (x) = exp − exp ,
σ
VaRp (X) = µ − σZlog(− log p),
σ p
ESp (X) = µ − log(− log v)dv
p 0

for −∞ < x < ∞, 0 < p < 1, −∞ < µ < ∞, the location parameter, and σ > 0, the scale
parameter.

Usage
dgumbel(x, mu=0, sigma=1, log=FALSE)
pgumbel(x, mu=0, sigma=1, log.p=FALSE, lower.tail=TRUE)
vargumbel(p, mu=0, sigma=1, log.p=FALSE, lower.tail=TRUE)
esgumbel(p, mu=0, sigma=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
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
76 gumbel2

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

Examples
x=runif(10,min=0,max=1)
dgumbel(x)
pgumbel(x)
vargumbel(x)
esgumbel(x)

gumbel2 Gumbel II distribution

Description
Computes the pdf, cdf, value at risk and expected shortfall for the Gumbel II distribution

f (x) = abx−a−1 exp −bx −a



,
F (x) = 1 − exp −bx−a ,

−1/a
VaRp (X) = b1/a [− log(1 − p)] ,
1/a Z p
b −1/a
ESp (X) = [− log(1 − v)] dv
p 0

for x > 0, 0 < p < 1, a > 0, the shape parameter, and b > 0, the scale parameter.

Usage
dgumbel2(x, a=1, b=1, log=FALSE)
pgumbel2(x, a=1, b=1, log.p=FALSE, lower.tail=TRUE)
vargumbel2(p, a=1, b=1, log.p=FALSE, lower.tail=TRUE)
esgumbel2(p, 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
a the value of the scale parameter, must be positive, the default is 1
b the value of the 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
halfcauchy 77

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
x=runif(10,min=0,max=1)
dgumbel2(x)
pgumbel2(x)
vargumbel2(x)
#esgumbel2(x)

halfcauchy Half Cauchy distribution

Description

Computes the pdf, cdf, value at risk and expected shortfall for the half Cauchy distribution given by

2 σ
f (x) = ,
π x2 + σ 2 
2 x
F (x) = arctan ,
π σπp 
VaRp (X) = σ tan ,
Z p 2 
σ πv
ESp (X) = tan dv
p 0 2

for x > 0, 0 < p < 1, and σ > 0, the scale parameter.

Usage

dhalfcauchy(x, sigma=1, log=FALSE)


phalfcauchy(x, sigma=1, log.p=FALSE, lower.tail=TRUE)
varhalfcauchy(p, sigma=1, log.p=FALSE, lower.tail=TRUE)
eshalfcauchy(p, sigma=1)
78 halflogis

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
sigma the value of the scale 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
x=runif(10,min=0,max=1)
dhalfcauchy(x)
phalfcauchy(x)
varhalfcauchy(x)
eshalfcauchy(x)

halflogis Half logistic distribution

Description
Computes the pdf, cdf, value at risk and expected shortfall for the half logistic distribution given by
2λ exp (−λx)
f (x) = 2,
[1 + exp (−λx)]
1 − exp (−λx)
F (x) = ,
1 + exp (−λx)
1 1−p
VaRp (X) = − log ,
λ 1+p
1 1−p 1
log 1 − p2

ESp (X) = − log +
λ 1 + p λp
for x > 0, 0 < p < 1, and λ > 0, the scale parameter.
halflogis 79

Usage

dhalflogis(x, lambda=1, log=FALSE)


phalflogis(x, lambda=1, log.p=FALSE, lower.tail=TRUE)
varhalflogis(p, lambda=1, log.p=FALSE, lower.tail=TRUE)
eshalflogis(p, lambda=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
lambda the value of the scale 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

x=runif(10,min=0,max=1)
dhalflogis(x)
phalflogis(x)
varhalflogis(x)
eshalflogis(x)
80 halfnorm

halfnorm Half normal distribution

Description
Computes the pdf, cdf, value at risk and expected shortfall for Half normal distribution given by
2 x
f (x) = φ ,
σ x σ
F (x) = 2Φ − 1,
σ  
−1 1+p
VaRp (X) = σΦ ,
Z p 2 
σ −1 1+v
ESp (X) = Φ dv
p 0 2
for x > 0, 0 < p < 1, and σ > 0, the scale parameter.

Usage
dhalfnorm(x, sigma=1, log=FALSE)
phalfnorm(x, sigma=1, log.p=FALSE, lower.tail=TRUE)
varhalfnorm(p, sigma=1, log.p=FALSE, lower.tail=TRUE)
eshalfnorm(p, sigma=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
sigma the value of the scale 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
halfT 81

Examples
x=runif(10,min=0,max=1)
dhalfnorm(x)
phalfnorm(x)
varhalfnorm(x)
eshalfnorm(x)

halfT Half Student’s t distribution

Description
Computes the pdf, cdf, value at risk and expected shortfall for the half Student’s t distribution given
by
− n+1
2Γ n+1
 
2  x2 2

f (x) = √ n 1+ ,
nπΓ 2  n
1 n
F (x) = I x2 , ,
s 2 2
x2 +n

nIp−1 12 , n2

VaRp (X) = ,
1−s Ip−1 12 , n2
√ Z p
Iv−1 12 , n2

n
ESp (X) =  dv
p 0 1 − Iv−1 12 , n2
for −∞ < x < ∞, 0 < p < 1, and n > 0, the degree of freedom parameter.

Usage
dhalfT(x, n=1, log=FALSE)
phalfT(x, n=1, log.p=FALSE, lower.tail=TRUE)
varhalfT(p, n=1, log.p=FALSE, lower.tail=TRUE)
eshalfT(p, n=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
n the value of the degree of freedom 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.
82 HBlaplace

Author(s)
Saralees Nadarajah

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

Examples
x=runif(10,min=0,max=1)
dhalfT(x)
phalfT(x)
varhalfT(x)
eshalfT(x)

HBlaplace Holla-Bhattacharya Laplace distribution

Description
Computes the pdf, cdf, value at risk and expected shortfall for the Holla-Bhattacharya Laplace
distribution due to Holla and Bhattacharya (1968) given by

 aφ exp {φ (x − θ)} , if x ≤ θ,
f (x) =
 (1 − a) φ exp {φ (θ − x)} , if x > θ,

 a exp (φx − θφ) , if x ≤ θ,
F (x) =
1 − (1 − a) exp (θφ − φx) , if x > θ,

 1 p
 θ + log , if p ≤ a,
φ a



VaRp (X) =  

 1 1−p
 θ − log
 , if p > a,
φ 1−a
 1 1 p
 θ − + log , if p ≤ a,
φ φ a



ESp (X) =  

 1 p − 2a − (1 − a) log a 1 − p 1−p

 θ(1 + p − a) + + log , if p > a
p φ φ 1−a
for −∞ < x < ∞, 0 < p < 1, −∞ < θ < ∞, the location parameter, 0 < a < 1, the first scale
parameter, and φ > 0, the second scale parameter.

Usage
dHBlaplace(x, a=0.5, theta=0, phi=1, log=FALSE)
pHBlaplace(x, a=0.5, theta=0, phi=1, log.p=FALSE, lower.tail=TRUE)
varHBlaplace(p, a=0.5, theta=0, phi=1, log.p=FALSE, lower.tail=TRUE)
esHBlaplace(p, a=0.5, theta=0, phi=1)
HL 83

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
theta the value of the location parameter, can take any real value, the default is zero
a the value of the first scale parameter, must be in the unit interval, the default is
0.5
phi the value of the second scale 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
x=runif(10,min=0,max=1)
dHBlaplace(x)
pHBlaplace(x)
varHBlaplace(x)
esHBlaplace(x)

HL Hankin-Lee distribution

Description
Computes the pdf, cdf, value at risk and expected shortfall for the Hankin-Lee distribution due to
Hankin and Lee (2006) given by
cpa
VaRp (X) = ,
(1 − p)b
c
ESp (X) = Bp (a + 1, 1 − b)
p
for 0 < p < 1, c > 0, the scale parameter, a > 0, the first shape parameter, and b > 0, the second
shape parameter.
84 Hlogis

Usage

varHL(p, a=1, b=1, c=1, log.p=FALSE, lower.tail=TRUE)


esHL(p, a=1, b=1, c=1)

Arguments

p scaler or vector of values at which the value at risk or expected shortfall needs
to be computed
c 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

x=runif(10,min=0,max=1)
varHL(x)
esHL(x)

Hlogis Hosking logistic distribution


Hlogis 85

Description
Computes the pdf, cdf, value at risk and expected shortfall for the Hosking logistic distribution due
to Hosking (1989, 1990) given by

(1 − kx)1/k−1
f (x) =  2 ,
1 + (1 − kx)1/k
1
F (x) = ,
− kx)1/k
1 + (1 "
 k #
1 1−p
VaRp (X) = 1− ,
k p
1 1
ESp (X) = − Bp (1 − k, 1 + k)
k kp

for x < 1/k if k > 0, x > 1/k if k < 0, −∞ < x < ∞ if k = 0, and −∞ < k < ∞, the shape
parameter.

Usage
dHlogis(x, k=1, log=FALSE)
pHlogis(x, k=1, log.p=FALSE, lower.tail=TRUE)
varHlogis(p, k=1, log.p=FALSE, lower.tail=TRUE)
esHlogis(p, k=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
k the value of the 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
86 invbeta

Examples
x=runif(10,min=0,max=1)
dHlogis(x)
pHlogis(x)
varHlogis(x)
esHlogis(x)

invbeta Inverse beta distribution

Description
Computes the pdf, cdf, value at risk and expected shortfall for the inverse beta distribution given by

xa−1
f (x) = ,
B(a, b)(1 + x)a+b
F (x) = I 1+x
x (a, b),

Ip−1 (a, b)
VaRp (X) = ,
1Z − Ip−1 (a, b)
p
1 Iv−1 (a, b)
ESp (X) = dv
p 0 1 − Iv−1 (a, b)

for x > 0, 0 < p < 1, a > 0, the first shape parameter, and b > 0, the second shape parameter.

Usage
dinvbeta(x, a=1, b=1, log=FALSE)
pinvbeta(x, a=1, b=1, log.p=FALSE, lower.tail=TRUE)
varinvbeta(p, a=1, b=1, log.p=FALSE, lower.tail=TRUE)
esinvbeta(p, 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
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.
invexpexp 87

Author(s)
Saralees Nadarajah

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

Examples
x=runif(10,min=0,max=1)
dinvbeta(x)
pinvbeta(x)
varinvbeta(x)
esinvbeta(x)

invexpexp Inverse exponentiated exponential distribution

Description
Computes the pdf, cdf, value at risk and expected shortfall for the inverse exponentiated exponential
distribution due to Ghitany et al. (2013) given by
   a−1
−2 λ λ
f (x) = aλx exp − 1 − exp − ,
 x a x
λ
F (x) = 1 − 1 − exp − ,
x
n h io−1
VaRp (X) = λ − log 1 − (1 − p)1/a ,
λ pn io−1
Z h
ESp (X) = − log 1 − (1 − v)1/a dv
p 0
for x > 0, 0 < p < 1, a > 0, the shape parameter and λ > 0, the scale parameter.

Usage
dinvexpexp(x, lambda=1, a=1, log=FALSE)
pinvexpexp(x, lambda=1, a=1, log.p=FALSE, lower.tail=TRUE)
varinvexpexp(p, lambda=1, a=1, log.p=FALSE, lower.tail=TRUE)
esinvexpexp(p, lambda=1, a=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
lambda the value of the scale parameter, must be positive, the default is 1
88 invgamma

a the value of the 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
x=runif(10,min=0,max=1)
dinvexpexp(x)
pinvexpexp(x)
varinvexpexp(x)
esinvexpexp(x)

invgamma Inverse gamma distribution

Description
Computes the pdf, cdf, value at risk and expected shortfall for the inverse gamma distribution given
by
ba exp(−b/x)
f (x) = ,
xa+1 Γ(a)
F (x) = Q(a, b/x),
−1
VaRp (X) = bZ Q−1 (a, p)

,
b p  −1 −1
ESp (X) = Q (a, v) dv
p 0
for x > 0, 0 < p < 1, a > 0, the shape parameter, and b > 0, the scale parameter.

Usage
dinvgamma(x, a=1, b=1, log=FALSE)
pinvgamma(x, a=1, b=1, log.p=FALSE, lower.tail=TRUE)
varinvgamma(p, a=1, b=1, log.p=FALSE, lower.tail=TRUE)
esinvgamma(p, a=1, b=1)
kum 89

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
b the value of the scale parameter, must be positive, the default is 1
a the value of the 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
x=runif(10,min=0,max=1)
dinvgamma(x)
pinvgamma(x)
varinvgamma(x)
esinvgamma(x)

kum Kumaraswamy distribution

Description
Computes the pdf, cdf, value at risk and expected shortfall for the Kumaraswamy distribution due
to Kumaraswamy (1980) given by
b−1
f (x) = abxa−1 (1 − xa ) ,
b
F (x) = 1 − (1 − xa ) ,
h i1/a
VaRp (X) = 1 − (1 − p)1/b ,
1 ph
Z i1/a
ESp (X) = 1 − (1 − v)1/b dv
p 0
for 0 < x < 1, 0 < p < 1, a > 0, the first shape parameter, and b > 0, the second shape parameter.
90 kum

Usage

dkum(x, a=1, b=1, log=FALSE)


pkum(x, a=1, b=1, log.p=FALSE, lower.tail=TRUE)
varkum(p, a=1, b=1, log.p=FALSE, lower.tail=TRUE)
eskum(p, 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
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

x=runif(10,min=0,max=1)
dkum(x)
pkum(x)
varkum(x)
eskum(x)
kumburr7 91

kumburr7 Kumaraswamy Burr XII distribution

Description
Computes the pdf, cdf, value at risk and expected shortfall for the Kumaraswamy Burr XII distri-
bution due to Parana\’iba et al. (2013) given by

abkcxc−1 h ia−1 n h
−k −k
ia ob−1
f (x) = k+1
1 − (1 + xc ) 1 − 1 − (1 + xc ) ,
(1 + xc )
n h ia ob
−k
F (x) = 1 − 1 − 1 − (1 + xc ) ,
" #1/c
h i1/a −1/k
1/b
VaRp (X) = 1 − 1 − (1 − p) −1 ,
" #1/c
1
Z p h i1/a −1/k
ESp (X) = 1 − 1 − (1 − v)1/b −1 dv
p 0

for x > 0, 0 < p < 1, a > 0, the first shape parameter, b > 0, the second shape parameter, c > 0,
the third shape parameter, and k > 0, the fourth shape parameter.

Usage
dkumburr7(x, a=1, b=1, k=1, c=1, log=FALSE)
pkumburr7(x, a=1, b=1, k=1, c=1, log.p=FALSE, lower.tail=TRUE)
varkumburr7(p, a=1, b=1, k=1, c=1, log.p=FALSE, lower.tail=TRUE)
eskumburr7(p, a=1, b=1, k=1, c=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
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
c the value of the third shape parameter, must be positive, the default is 1
k the value of the fourth 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.
92 kumexp

Author(s)
Saralees Nadarajah

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

Examples
x=runif(10,min=0,max=1)
dkumburr7(x)
pkumburr7(x)
varkumburr7(x)
eskumburr7(x)

kumexp Kumaraswamy exponential distribution

Description
Computes the pdf, cdf, value at risk and expected shortfall for the Kumaraswamy exponential dis-
tribution due to Cordeiro and de Castro (2011) given by
a−1 a b−1
f (x) = abλ exp(−λx) [1 − exp(−λx)] {1 − [1 − exp(−λx)] } ,
a b
F (x) = 1 − {1 − [1 − exp(−λx)] } ,
1 h i1/a 
VaRp (X) = − log 1 − 1 − (1 − p)1/b ,
λZ
p 
1/a

1 h i
ESp (X) = − log 1 − 1 − (1 − v)1/b dv
pλ 0

for x > 0, 0 < p < 1, a > 0, the first shape parameter, b > 0, the second shape parameter, and
λ > 0, the scale parameter.

Usage
dkumexp(x, lambda=1, a=1, b=1, log=FALSE)
pkumexp(x, lambda=1, a=1, b=1, log.p=FALSE, lower.tail=TRUE)
varkumexp(p, lambda=1, a=1, b=1, log.p=FALSE, lower.tail=TRUE)
eskumexp(p, lambda=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
lambda the value of the scale parameter, must be positive, the default is 1
kumgamma 93

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
x=runif(10,min=0,max=1)
dkumexp(x)
pkumexp(x)
varkumexp(x)
eskumexp(x)

kumgamma Kumaraswamy gamma distribution

Description
Computes the pdf, cdf, value at risk and expected shortfall for the Kumaraswamy gamma distribu-
tion due to de Pascoa et al. (2011) given by
d−1
γ c−1 (a, bx) γ c (a, bx)

a a−1
f (x) = cdb x exp(−bx) 1− ,
Γc (a) Γc (a)
d
γ c (a, bx)
 
F (x) = 1 − 1 − ,
Γc (a)

1 h i1/c 
VaRp (X) = Q−1 a, 1 − 1 − (1 − p)1/d ,
bZ
p  i1/c 
1 h
ESp (X) = Q−1 a, 1 − 1 − (1 − v)1/d dv
bp 0

for x > 0, 0 < p < 1, a > 0, the first shape parameter, b > 0, the scale parameter, c > 0, the
second shape parameter, and d > 0, the third shape parameter.
94 kumgamma

Usage

dkumgamma(x, a=1, b=1, c=1, d=1, log=FALSE)


pkumgamma(x, a=1, b=1, c=1, d=1, log.p=FALSE, lower.tail=TRUE)
varkumgamma(p, a=1, b=1, c=1, d=1, log.p=FALSE, lower.tail=TRUE)
eskumgamma(p, a=1, b=1, c=1, d=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
b 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
c the value of the second shape parameter, must be positive, the default is 1
d the value of the third 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
x=runif(10,min=0,max=1)
dkumgamma(x)
pkumgamma(x)
varkumgamma(x)
eskumgamma(x)
kumgumbel 95

kumgumbel Kumaraswamy Gumbel distribution

Description
Computes the pdf, cdf, value at risk and expected shortfall for the Kumaraswamy Gumbel distribu-
tion due to Cordeiro et al. (2012a) given by
        b−1
ab µ−x µ−x µ−x
f (x) = exp exp −a exp 1 − exp −a exp ,
σ σ σ σ
   b
µ−x
F (x) = 1 − 1 − exp −a exp ,
 σ
h i1/a 
VaRp (X) = µ − σ log − log 1 − (1 − p)1/b ,
Z p  i1/a 
σ h
ESp (X) = µ − log − log 1 − (1 − v)1/b dv
p 0

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
dkumgumbel(x, a=1, b=1, mu=0, sigma=1, log=FALSE)
pkumgumbel(x, a=1, b=1, mu=0, sigma=1, log.p=FALSE, lower.tail=TRUE)
varkumgumbel(p, a=1, b=1, mu=0, sigma=1, log.p=FALSE, lower.tail=TRUE)
eskumgumbel(p, a=1, b=1, mu=0, sigma=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.
96 kumhalfnorm

Author(s)

Saralees Nadarajah

References

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

Examples

x=runif(10,min=0,max=1)
dkumgumbel(x)
pkumgumbel(x)
varkumgumbel(x)
eskumgumbel(x)

kumhalfnorm Kumaraswamy half normal distribution

Description

Computes the pdf, cdf, value at risk and expected shortfall for the Kumaraswamy half normal
distribution due to Cordeiro et al. (2012c) given by

2ab  x  h  x  ia−1 n h x ia ob−1


f (x) = φ 2Φ −1 1 − 2Φ −1 ,
σ n σ h  σ b
σ
x i a o
F (x) = 1 − 1 − 2Φ −1 ,
 σ h i1/a 
−1 1 1 1/b
VaRp (X) = σΦ + 1 − (1 − p) ,
Z p 2 2 
σ 1 1 h i1/a
−1 1/b
ESp (X) = Φ + 1 − (1 − v) dv
p 0 2 2

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

Usage

dkumhalfnorm(x, sigma=1, a=1, b=1, log=FALSE)


pkumhalfnorm(x, sigma=1, a=1, b=1, log.p=FALSE, lower.tail=TRUE)
varkumhalfnorm(p, sigma=1, a=1, b=1, log.p=FALSE, lower.tail=TRUE)
eskumhalfnorm(p, sigma=1, a=1, b=1)
kumloglogis 97

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
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

x=runif(10,min=0,max=1)
dkumhalfnorm(x)
pkumhalfnorm(x)
varkumhalfnorm(x)
eskumhalfnorm(x)

kumloglogis Kumaraswamy log-logistic distribution


98 kumloglogis

Description
Computes the pdf, cdf, value at risk and expected shortfall for the Kumaraswamy log-logistic dis-
tribution due to de Santana et al. (2012) given by
b−1
abβαβ xaβ−1 xaβ

f (x) = a+1 1 − a ,
(αβ + xβ ) (αβ + xβ )
b
xaβ

F (x) = 1 − β a ,
(α + xβ )
h i1/a −1/β
VaRp (X) = α 1 − (1 − p)1/b −1 ,
Z p h i1/a  −1/β
α
ESp (X) = 1 − (1 − v)1/b −1 dv
p 0

for x > 0, 0 < p < 1, α > 0, the scale parameter, β > 0, the first shape parameter, a > 0, the
second shape parameter, and b > 0, the third shape parameter.

Usage
dkumloglogis(x, a=1, b=1, alpha=1, beta=1, log=FALSE)
pkumloglogis(x, a=1, b=1, alpha=1, beta=1, log.p=FALSE, lower.tail=TRUE)
varkumloglogis(p, a=1, b=1, alpha=1, beta=1, log.p=FALSE, lower.tail=TRUE)
eskumloglogis(p, a=1, b=1, alpha=1, beta=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
alpha the value of the scale parameter, must be positive, the default is 1
beta the value of the first shape parameter, must be positive, the default is 1
a the value of the second shape parameter, must be positive, the default is 1
b the value of the third 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
kumnormal 99

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

Examples
x=runif(10,min=0,max=1)
dkumloglogis(x)
pkumloglogis(x)
varkumloglogis(x)
eskumloglogis(x)

kumnormal Kumaraswamy normal distribution

Description
Computes the pdf, cdf, value at risk and expected shortfall for Kumaraswamy normal distribution
due to Cordeiro and de Castro (2011) given by
 
   b−1
ab x−µ x−µ x−µ
f (x) = φ Φa−1 1 − Φa ,
σ σ σ σ
  b
x−µ
F (x) = 1 − 1 − Φa ,
hσ i1/a 
−1 1/b
VaRp (X) = µ + σΦ 1 − (1 − p) ,
Z p h
1/a

σ −1 1/b
i
ESp (X) = µ + Φ 1 − (1 − v) dv
p 0

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
dkumnormal(x, mu=0, sigma=1, a=1, b=1, log=FALSE)
pkumnormal(x, mu=0, sigma=1, a=1, b=1, log.p=FALSE, lower.tail=TRUE)
varkumnormal(p, mu=0, sigma=1, a=1, b=1, log.p=FALSE, lower.tail=TRUE)
eskumnormal(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
100 kumpareto

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
x=runif(10,min=0,max=1)
dkumnormal(x)
pkumnormal(x)
varkumnormal(x)
eskumnormal(x)

kumpareto Kumaraswamy Pareto distribution

Description
Computes the pdf, cdf, value at risk and expected shortfall for the Kumaraswamy Pareto distribution
due to Pereira et al. (2013) given by
  c a−1    c a b−1
K K
f (x) = abcK c x−c−1 1 − 1− 1− ,
x x
   c a b
K
F (x) = 1 − 1 − 1 − ,
x
 h i1/a −1/c
1/b
VaRp (X) = K 1 − 1 − (1 − p) ,

K
Z p h i1/a −1/c

ESp (X) = 1 − 1 − (1 − v)1/b dv
p 0
for x ≥ K, 0 < p < 1, K > 0, the scale parameter, c > 0, the first shape parameter, a > 0, the
second shape parameter, and b > 0, the third shape parameter.
kumpareto 101

Usage

dkumpareto(x, K=1, a=1, b=1, c=1, log=FALSE)


pkumpareto(x, K=1, a=1, b=1, c=1, log.p=FALSE, lower.tail=TRUE)
varkumpareto(p, K=1, a=1, b=1, c=1, log.p=FALSE, lower.tail=TRUE)
eskumpareto(p, K=1, a=1, b=1, c=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
K 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
c the value of the third 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
x=runif(10,min=0,max=1)
dkumpareto(x)
pkumpareto(x)
varkumpareto(x)
eskumpareto(x)
102 kumweibull

kumweibull Kumaraswamy Weibull distribution

Description
Computes the pdf, cdf, value at risk and expected shortfall for the Kumaraswamy Weibull distribu-
tion due to Cordeiro et al. (2010) given by

abαxα−1 h  x α i n h  x α ioa−1  n h  x α ioa b−1


f (x) = exp − 1 − exp − 1 − 1 − exp − ,
σα σ σ σ
 n h  x α ioa b
F (x) = 1 − 1 − 1 − exp − ,
σ
  h i1/a 1/α
1/b
VaRp (X) = σ − log 1 − 1 − (1 − p) ,
Z p  i1/a  1/α
σ h
ESp (X) = − log 1 − 1 − (1 − v)1/b dv
p 0

for x > 0, 0 < p < 1, a > 0, the first shape parameter, b > 0, the second shape parameter, α > 0,
the third shape parameter, and σ > 0, the scale parameter.

Usage
dkumweibull(x, a=1, b=1, alpha=1, sigma=1, log=FALSE)
pkumweibull(x, a=1, b=1, alpha=1, sigma=1, log.p=FALSE, lower.tail=TRUE)
varkumweibull(p, a=1, b=1, alpha=1, sigma=1, log.p=FALSE, lower.tail=TRUE)
eskumweibull(p, a=1, b=1, alpha=1, sigma=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
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
alpha the value of the third 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.
laplace 103

Author(s)
Saralees Nadarajah

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

Examples
x=runif(10,min=0,max=1)
dkumweibull(x)
pkumweibull(x)
varkumweibull(x)
eskumweibull(x)

laplace Laplace distribution

Description
Computes the pdf, cdf, value at risk and expected shortfall for the Laplace distribution due to due
to Laplace (1774) given by
 
1 |x−µ|
f (x) = exp − ,

  σ 
1 x−µ
exp , if x < µ,


 2 σ


F (x) =  

 1 x−µ
 1 − exp − , if x ≥ µ,


 2 σ
 µ + σ log(2p), if p < 1/2,
VaRp (X) =
µ − σ log [2(1 − p)] , if p ≥ 1/2,

µ + σ [log(2p) − 1] , if p < 1/2,



ESp (X) =
 µ + σ − σ + σ 1 − p log(1 − p) + σ 1 − p log 2, if p ≥ 1/2

p p p
for −∞ < x < ∞, 0 < p < 1, −∞ < µ < ∞, the location parameter, and σ > 0, the scale
parameter.

Usage
dlaplace(x, mu=0, sigma=1, log=FALSE)
plaplace(x, mu=0, sigma=1, log.p=FALSE, lower.tail=TRUE)
varlaplace(p, mu=0, sigma=1, log.p=FALSE, lower.tail=TRUE)
eslaplace(p, mu=0, sigma=1)
104 lfr

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
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
x=runif(10,min=0,max=1)
dlaplace(x)
plaplace(x)
varlaplace(x)
eslaplace(x)

lfr Linear failure rate distribution

Description
Computes the pdf, cdf, value at risk and expected shortfall for the linear failure rate distribution due
to Bain (1974) given by
f (x) = (a + bx) exp −ax − bx2 /2 ,

2
F (x) = 1 − exp −ax p − bx /2 ,
2
−a + a − 2b log(1 − p)
VaRp (X) = ,
Z pp b
a 1
ESp (X) = − + a2 − 2b log(1 − v)dv
b bp 0
for x > 0, 0 < p < 1, a > 0, the first scale parameter, and b > 0, the second scale parameter.
lfr 105

Usage

dlfr(x, a=1, b=1, log=FALSE)


plfr(x, a=1, b=1, log.p=FALSE, lower.tail=TRUE)
varlfr(p, a=1, b=1, log.p=FALSE, lower.tail=TRUE)
eslfr(p, 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
a the value of the first scale parameter, must be positive, the default is 1
b the value of the second scale 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

x=runif(10,min=0,max=1)
dlfr(x)
plfr(x)
varlfr(x)
eslfr(x)
106 LNbeta

LNbeta Libby-Novick beta distribution

Description
Computes the pdf, cdf, value at risk and expected shortfall for the Libby-Novick beta distribution
due to Libby and Novick (1982) given by
λa xa−1 (1 − x)b−1
f (x) = a+b
,
B(a, b) [1 − (1 − λ)x]
F (x) = I λx (a, b),
1+(λ−1)x
Ip−1 (a, b)
VaRp (X) = ,
λZ − (λ − 1)Ip−1 (a, b)
1 p Iv−1 (a, b)
ESp (X) = dv
p 0 λ − (λ − 1)Iv−1 (a, b)
for 0 < x < 1, 0 < p < 1, λ > 0, the scale parameter, a > 0, the first shape parameter, and b > 0,
the second shape parameter.

Usage
dLNbeta(x, lambda=1, a=1, b=1, log=FALSE)
pLNbeta(x, lambda=1, a=1, b=1, log.p=FALSE, lower.tail=TRUE)
varLNbeta(p, lambda=1, a=1, b=1, log.p=FALSE, lower.tail=TRUE)
esLNbeta(p, lambda=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
lambda 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
logbeta 107

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

Examples
x=runif(10,min=0,max=1)
dLNbeta(x)
pLNbeta(x)
varLNbeta(x)
esLNbeta(x)

logbeta Log beta distribution

Description
Computes the pdf, cdf, value at risk and expected shortfall for the log beta distribution given by

(log d − log c)1−a−b


f (x) = (log x − log c)a−1 (log d − log x)b−1 ,
xB(a, b)
F (x) = I log x−log c (a, b),
log d−log c
 Ip−1 (a,b)
d
VaRp (X) = c ,
c
Z p  Iv−1 (a,b)
c d
ESp (X) = dv
p 0 c
for 0 < c ≤ x ≤ d, 0 < p < 1, a > 0, the first shape parameter, b > 0, the second shape parameter,
c > 0, the first location parameter, and d > 0, the second location parameter.

Usage
dlogbeta(x, a=1, b=1, c=1, d=2, log=FALSE)
plogbeta(x, a=1, b=1, c=1, d=2, log.p=FALSE, lower.tail=TRUE)
varlogbeta(p, a=1, b=1, c=1, d=2, log.p=FALSE, lower.tail=TRUE)
eslogbeta(p, a=1, b=1, c=1, d=2)

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
c the value of the first location parameter, must be positive, the default is 1
d the value of the second location parameter, must be positive and greater than c,
the default is 2
a the value of the first scale parameter, must be positive, the default is 1
108 logcauchy

b the value of the second scale 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
x=runif(10,min=0,max=1)
dlogbeta(x)
plogbeta(x)
varlogbeta(x)
eslogbeta(x)

logcauchy Log Cauchy distribution

Description
Computes the pdf, cdf, value at risk and expected shortfall for the log Cauchy distribution given by
1 σ
f (x) = ,
− µ)2 + σ 2 
xπ (log x 
1 log x − µ
F (x) = arctan ,
π σ
VaRp (X) = exp [µ Z+ σ tan (πp)] ,
exp(µ) p
ESp (X) = exp [σ tan (πv)] dv
p 0

for x > 0, 0 < p < 1, −∞ < µ < ∞, the location parameter, and σ > 0, the scale parameter.

Usage
dlogcauchy(x, mu=0, sigma=1, log=FALSE)
plogcauchy(x, mu=0, sigma=1, log.p=FALSE, lower.tail=TRUE)
varlogcauchy(p, mu=0, sigma=1, log.p=FALSE, lower.tail=TRUE)
eslogcauchy(p, mu=0, sigma=1)
loggamma 109

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
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
x=runif(10,min=0,max=1)
dlogcauchy(x)
plogcauchy(x)
varlogcauchy(x)
#eslogcauchy(x)

loggamma Log gamma distribution

Description
Computes the pdf, cdf, value at risk and expected shortfall for the log gamma distribution due to
Consul and Jain (1971) given by
ar xa−1 (− log x)r−1
f (x) = ,
Γ(r)
F (x) = Q(r, −a log
 x), 
1
VaRp (X) = exp − Q−1 (r, p) ,
a
1 p
Z 
1
ESp (X) = exp − Q−1 (r, v) dv
p 0 a
for x > 0, 0 < p < 1, a > 0, the first shape parameter, and r > 0, the second shape parameter.
110 loggamma

Usage

dloggamma(x, a=1, r=1, log=FALSE)


ploggamma(x, a=1, r=1, log.p=FALSE, lower.tail=TRUE)
varloggamma(p, a=1, r=1, log.p=FALSE, lower.tail=TRUE)
esloggamma(p, a=1, r=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
a the value of the first scale parameter, must be positive, the default is 1
r the value of the second scale 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

x=runif(10,min=0,max=1)
dloggamma(x)
ploggamma(x)
varloggamma(x)
esloggamma(x)
logisexp 111

logisexp Logistic exponential distribution

Description
Computes the pdf, cdf, value at risk and expected shortfall for the logistic exponential distribution
due to Lan and Leemis (2008) given by
a−1
aλ exp(λx) [exp(λx) − 1]
f (x) = a 2
,
{1 + [exp(λx) − 1] }
a
[exp(λx) − 1]
F (x) = a,
" −
1 + [exp(λx) 1]
1/a #
1 p
VaRp (X) = log 1 + ,
λ 1−p
Z p "  1/a #
1 v
ESp (X) = log 1 + dv
pλ 0 1−v

for x > 0, 0 < p < 1, a > 0, the shape parameter and λ > 0, the scale parameter.

Usage
dlogisexp(x, lambda=1, a=1, log=FALSE)
plogisexp(x, lambda=1, a=1, log.p=FALSE, lower.tail=TRUE)
varlogisexp(p, lambda=1, a=1, log.p=FALSE, lower.tail=TRUE)
eslogisexp(p, lambda=1, a=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
lambda the value of the scale parameter, must be positive, the default is 1
a the value of the 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
112 logisrayleigh

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

Examples
x=runif(10,min=0,max=1)
dlogisexp(x)
plogisexp(x)
varlogisexp(x)
eslogisexp(x)

logisrayleigh Logistic Rayleigh distribution

Description
Computes the pdf, cdf, value at risk and expected shortfall for the logistic Rayleigh distribution due
to Lan and Leemis (2008) given by
a−1 n a o−2
f (x) = aλx exp λx2 /2 exp λx2 /2 − 1 1 + exp λx2 /2 − 1
   
,
 2
 a
exp λx /2 − 1
F (x) = a,
1 + [exp v(λx2 /2) − 1]
r u "  1/a #
2u p
VaRp (X) = tlog 1 + ,
λ 1−p
√ Z p( "  1/a #)1/2
2 v
ESp (X) = √ log 1 + dv
p λ 0 1−v

for x > 0, 0 < p < 1, a > 0, the shape parameter, and λ > 0, the scale parameter.

Usage
dlogisrayleigh(x, a=1, lambda=1, log=FALSE)
plogisrayleigh(x, a=1, lambda=1, log.p=FALSE, lower.tail=TRUE)
varlogisrayleigh(p, a=1, lambda=1, log.p=FALSE, lower.tail=TRUE)
eslogisrayleigh(p, a=1, lambda=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
lambda the value of the scale parameter, must be positive, the default is 1
a the value of the shape parameter, must be positive, the default is 1
logistic 113

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
x=runif(10,min=0,max=1)
dlogisrayleigh(x)
plogisrayleigh(x)
varlogisrayleigh(x)
eslogisrayleigh(x)

logistic Logistic distribution

Description
Computes the pdf, cdf, value at risk and expected shortfall for the logistic distribution given by
   −2
1 x−µ x−µ
f (x) = exp − 1 + exp − ,
σ σ σ
1
F (x) = ,
1 + exp − x−µσ
VaRp (X) = µ + σ log [p(1 − p)] ,
1−p
ESp (X) = µ − 2σ + σ log p − σ log(1 − p)
p
for −∞ < x < ∞, 0 < p < 1, −∞ < µ < ∞, the location parameter, and σ > 0, the scale
parameter.

Usage
dlogistic(x, mu=0, sigma=1, log=FALSE)
plogistic(x, mu=0, sigma=1, log.p=FALSE, lower.tail=TRUE)
varlogistic(p, mu=0, sigma=1, log.p=FALSE, lower.tail=TRUE)
eslogistic(p, mu=0, sigma=1)
114 loglaplace

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

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

x=runif(10,min=0,max=1)
dlogistic(x)
plogistic(x)
varlogistic(x)
eslogistic(x)

loglaplace Log Laplace distribution


loglaplace 115

Description
Computes the pdf, cdf, value at risk and expected shortfall for the log Laplace distribution given by

b−1
 abx

, if x ≤ δ,
 δ b (a + b)


f (x) =

 abδ a
, if x > δ,


 a+1
 x (a + b)
axb
, if x ≤ δ,


b

 δ (a + b)

F (x) =

 bδ a
 1− a , if x > δ,


 x (a + b) 
1/b
 a+b a
δ p , if p ≤ a+b ,


a



VaRp (X) =
  −1/a

 a+b a
 δ (1 − p) , if p > a+b ,


 a
 1/b
 δb a+b a

 p , if p ≤ a+b ,
b + 1 a







ESp (X) = aδ a1/a b1−1/a δ
+
p(1 + 1/b)(a + b) p(a + b)(1 − 1/a)




  1/a
δ(1 − p) a

 a
 − , if p > a+b


p(1 − 1/a) (a + b)(1 − p)
for −∞ < x < ∞, 0 < p < 1, δ > 0, the scale parameter, a > 0, the first shape parameter, and
b > 0, the second shape parameter.

Usage
dloglaplace(x, a=1, b=1, delta=0, log=FALSE)
ploglaplace(x, a=1, b=1, delta=0, log.p=FALSE, lower.tail=TRUE)
varloglaplace(p, a=1, b=1, delta=0, log.p=FALSE, lower.tail=TRUE)
esloglaplace(p, a=1, b=1, delta=0)

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
delta 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
116 loglog

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
x=runif(10,min=0,max=1)
dloglaplace(x)
ploglaplace(x)
varloglaplace(x)
esloglaplace(x)

loglog Loglog distribution

Description
Computes the pdf, cdf, value at risk and expected shortfall for the Loglog distribution due to Pham
(2002) given by
a
h a
i
f (x) = a log(λ)xa−1 λx exp 1 − λx ,
h a
i
F (x) = 1 − exp 1 − λx ,
 1/a
log [1 − log(1 − p)]
VaRp (X) = ,
log
Z λp
1 1/a
ESp (X) = {log [1 − log(1 − v)]} dv
p(log λ)1/a 0

for x > 0, 0 < p < 1, a > 0, the shape parameter, and λ > 1, the scale parameter.

Usage
dloglog(x, a=1, lambda=2, log=FALSE)
ploglog(x, a=1, lambda=2, log.p=FALSE, lower.tail=TRUE)
varloglog(p, a=1, lambda=2, log.p=FALSE, lower.tail=TRUE)
esloglog(p, a=1, lambda=2)
loglogis 117

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
lambda the value of the scale parameter, must be greater than 1, the default is 2
a the value of the 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
x=runif(10,min=0,max=1)
dloglog(x)
ploglog(x)
varloglog(x)
esloglog(x)

loglogis Log-logistic distribution

Description
Computes the pdf, cdf, value at risk and expected shortfall for the log-logistic distribution given by
bab xb−1
f (x) = 2,
(ab + xb )
xb
F (x) = b b
,
a + x 1/b
p
VaRp (X) = a ,
1 −
 p 
a 1 1
ESp (X) = Bp 1 + , 1 −
p b b
118 loglogis

for x > 0, R0 < p < 1, a > 0, the scale parameter, and b > 0, the shape parameter, where
x
Bx (a, b) = 0 ta−1 (1 − t)b−1 dt denotes the incomplete beta function.

Usage

dloglogis(x, a=1, b=1, log=FALSE)


ploglogis(x, a=1, b=1, log.p=FALSE, lower.tail=TRUE)
varloglogis(p, a=1, b=1, log.p=FALSE, lower.tail=TRUE)
esloglogis(p, 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
a the value of the scale parameter, must be positive, the default is 1
b the value of the 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
x=runif(10,min=0,max=1)
dloglogis(x)
ploglogis(x)
varloglogis(x)
esloglogis(x)
lognorm 119

lognorm Lognormal distribution

Description
Computes the pdf, cdf, value at risk and expected shortfall for the lognormal distribution given by
 
1 log x − µ
f (x) = φ ,
σx σ 
log x − µ
F (x) = Φ ,
σ
VaRp (X) = exp µZ+ σΦ−1 (p) ,

p
exp(µ)
exp σΦ−1 (v) dv
 
ESp (X) =
p 0

for x > 0, 0 < p < 1, −∞ < µ < ∞, the location parameter, and σ > 0, the scale parameter.

Usage
dlognorm(x, mu=0, sigma=1, log=FALSE)
plognorm(x, mu=0, sigma=1, log.p=FALSE, lower.tail=TRUE)
varlognorm(p, mu=0, sigma=1, log.p=FALSE, lower.tail=TRUE)
eslognorm(p, mu=0, sigma=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
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
120 lomax

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

Examples
x=runif(10,min=0,max=1)
dlognorm(x)
plognorm(x)
varlognorm(x)
eslognorm(x)

lomax Lomax distribution

Description
Computes the pdf, cdf, value at risk and expected shortfall for the Lomax distribution due to Lomax
(1954) given by
a x −a−1
f (x) = 1+ ,
λ  λ −a
x
F (x) = 1 − 1 + ,
h λ i
−1/a
VaRp (X) = λ (1 − p) −1 ,
λ − λ(1 − p)1−1/a
ESp (X) = −λ +
p − p/a
for x > 0, 0 < p < 1, a > 0, the shape parameter, and λ > 0, the scale parameter.

Usage
dlomax(x, a=1, lambda=1, log=FALSE)
plomax(x, a=1, lambda=1, log.p=FALSE, lower.tail=TRUE)
varlomax(p, a=1, lambda=1, log.p=FALSE, lower.tail=TRUE)
eslomax(p, a=1, lambda=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
lambda the value of the scale parameter, must be positive, the default is 1
a the value of the 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
Mlaplace 121

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
x=runif(10,min=0,max=1)
dlomax(x)
plomax(x)
varlomax(x)
eslomax(x)

Mlaplace McGill Laplace distribution

Description
Computes the pdf, cdf, value at risk and expected shortfall for the McGill Laplace distribution due
to McGill (1962) given by
  
1 x−θ
exp , if x ≤ θ,


 2ψ ψ


f (x) =  

 1 θ−x
exp , if x > θ,


 2φ  φ 

1 x−θ
exp , if x ≤ θ,


 2 ψ


F (x) =  

 1 θ−x
 1 − exp , if x > θ,


 2 φ
 θ + ψ log(2p), if p ≤ 1/2,
VaRp (X) =
θ − φ log (2(1 − p)) , if p > 1/2,

ψ + θ log(2p) − θp, if p ≤ 1/2,






ψ − φ − 2θ φ

ESp (X) = θ+φ+ + log 2 − φ log 2

 2p p

 φ
 + log(1 − p) − φ log(1 − p),
 if p > 1/2
p
122 Mlaplace

for −∞ < x < ∞, 0 < p < 1, −∞ < θ < ∞, the location parameter, φ > 0, the first scale
parameter, and ψ > 0, the second scale parameter.

Usage
dMlaplace(x, theta=0, phi=1, psi=1, log=FALSE)
pMlaplace(x, theta=0, phi=1, psi=1, log.p=FALSE, lower.tail=TRUE)
varMlaplace(p, theta=0, phi=1, psi=1, log.p=FALSE, lower.tail=TRUE)
esMlaplace(p, theta=0, phi=1, psi=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
theta the value of the location parameter, can take any real value, the default is zero
phi the value of the first scale parameter, must be positive, the default is 1
psi the value of the second scale 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
x=runif(10,min=0,max=1)
dMlaplace(x)
pMlaplace(x)
varMlaplace(x)
esMlaplace(x)
moexp 123

moexp Marshall-Olkin exponential distribution

Description
Computes the pdf, cdf, value at risk and expected shortfall for the Marshall-Olkin exponential
distribution due to Marshall and Olkin (1997) given by

λ exp(λx)
f (x) = 2,
[exp(λx) − 1 + a]
exp(λx) − 2 + a
F (x) = ,
exp(λx) − 1 + a
1 2 − a − (1 − a)p
VaRp (X) = log ,
λ 1−p
1 2−a 2 − a − (1 − a)p 1 − p
ESp (X) = log [2 − a − (1 − a)p] − log + log(1 − p)
λ λ(1 − a)p 2−a λp

for x > 0, 0 < p < 1, a > 0, the first scale parameter and λ > 0, the second scale parameter.

Usage
dmoexp(x, lambda=1, a=1, log=FALSE)
pmoexp(x, lambda=1, a=1, log.p=FALSE, lower.tail=TRUE)
varmoexp(p, lambda=1, a=1, log.p=FALSE, lower.tail=TRUE)
esmoexp(p, lambda=1, a=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
a the value of the first scale parameter, must be positive, the default is 1
lambda the value of the second scale 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
124 moweibull

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

Examples
x=runif(10,min=0,max=1)
dmoexp(x)
pmoexp(x)
varmoexp(x)
esmoexp(x)

moweibull Marshall-Olkin Weibull distribution

Description
Computes the pdf, cdf, value at risk and expected shortfall for the Marshall-Olkin Weibull distribu-
tion due to Marshall and Olkin (1997) given by
−2
f (x) = bλb xb−1 (λx)b exp (λx)b − 1 + a
   
 exp ,
exp (λx)b − 2 + a

F (x) = ,
exp (λx)b − 1 + a
 
  1/b
1 1
VaRp (X) = log +1−a ,
λ 1−p
Z p  1/b
1 1
ESp (X) = log +1−a dv
λp 0 1−v
for x > 0, 0 < p < 1, a > 0, the first scale parameter, b > 0, the shape parameter, and λ > 0, the
second scale parameter.

Usage
dmoweibull(x, a=1, b=1, lambda=1, log=FALSE)
pmoweibull(x, a=1, b=1, lambda=1, log.p=FALSE, lower.tail=TRUE)
varmoweibull(p, a=1, b=1, lambda=1, log.p=FALSE, lower.tail=TRUE)
esmoweibull(p, a=1, b=1, lambda=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
a the value of the first scale parameter, must be positive, the default is 1
lambda the value of the second scale parameter, must be positive, the default is 1
b the value of the shape parameter, must be positive, the default is 1
MRbeta 125

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
x=runif(10,min=0,max=1)
dmoweibull(x)
pmoweibull(x)
varmoweibull(x)
esmoweibull(x)

MRbeta McDonald-Richards beta distribution

Description

Computes the pdf, cdf, value at risk and expected shortfall for the McDonald-Richards beta distri-
bution due to McDonald and Richards (1987a, 1987b) given by
b−1
xar−1 (bq r − xr )
f (x) = a+b−1
,
(bq r ) B(a, b)
F (x) = I xrr (a, b),
bq
1/r
VaRp (X) = b1/r q Ip−1 (a, b)

,
b1/r q p  −1
Z
1/r
ESp (X) = Iv (a, b) dv
p 0

for 0 ≤ x ≤ b1/r q, 0 < p < 1, q > 0, the scale parameter, a > 0, the first shape parameter, b > 0,
the second shape parameter, and r > 0, the third shape parameter.
126 MRbeta

Usage

dMRbeta(x, a=1, b=1, r=1, q=1, log=FALSE)


pMRbeta(x, a=1, b=1, r=1, q=1, log.p=FALSE, lower.tail=TRUE)
varMRbeta(p, a=1, b=1, r=1, q=1, log.p=FALSE, lower.tail=TRUE)
esMRbeta(p, a=1, b=1, r=1, q=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
q 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
r the value of the third 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
x=runif(10,min=0,max=1)
dMRbeta(x)
pMRbeta(x)
varMRbeta(x)
esMRbeta(x)
nakagami 127

nakagami Nakagami distribution

Description
Computes the pdf, cdf, value at risk and expected shortfall for the Nakagami distribution due to
Nakagami (1960) given by

2mm 2m−1 mx2


 
f (x) = m
x exp − ,
Γ(m)a a
mx2

F (x) = 1 − Q m, ,
r a
a p −1
VaRp (X) = Q (m, 1 − p),
m
√ Z pp
a
ESp (X) = √ Q−1 (m, 1 − v)dv
p m 0

for x > 0, 0 < p < 1, a > 0, the scale parameter, and m > 0, the shape parameter.

Usage
dnakagami(x, m=1, a=1, log=FALSE)
pnakagami(x, m=1, a=1, log.p=FALSE, lower.tail=TRUE)
varnakagami(p, m=1, a=1, log.p=FALSE, lower.tail=TRUE)
esnakagami(p, m=1, a=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
a the value of the scale parameter, must be positive, the default is 1
m the value of the 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
128 normal

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

Examples
x=runif(10,min=0,max=1)
dnakagami(x)
pnakagami(x)
varnakagami(x)
esnakagami(x)

normal Normal distribution

Description
Computes the pdf, cdf, value at risk and expected shortfall for the normal distribution due to de
Moivre (1738) and Gauss (1809) given by
 
1 x−µ
f (x) = φ ,
σ σ 
x−µ
F (x) = Φ ,
σ
−1
VaRp (X) = µ + σΦ (p),
σ p −1
Z
ESp (X) = µ + Φ (v)dv
p 0
for −∞ < x < ∞, 0 < p < 1, −∞ < µ < ∞, the location parameter, and σ > 0, the scale
parameter, where φ(·) denotes the pdf of a standard normal random variable, and Φ(·) denotes the
cdf of a standard normal random variable.

Usage
dnormal(x, mu=0, sigma=1, log=FALSE)
pnormal(x, mu=0, sigma=1, log.p=FALSE, lower.tail=TRUE)
varnormal(p, mu=0, sigma=1, log.p=FALSE, lower.tail=TRUE)
esnormal(p, mu=0, sigma=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
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
pareto 129

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
x=runif(10,min=0,max=1)
dnormal(x)
pnormal(x)
varnormal(x)
esnormal(x)

pareto Pareto distribution

Description

Computes the pdf, cdf, value at risk and expected shortfall for the Pareto distribution due to Pareto
(1964) given by
f (x) = cK c x−c−1
,c
K
F (x) = 1 − ,
x
VaRp (X) = K(1 − p)−1/c ,
Kc Kc
ESp (X) = (1 − p)1−1/c −
p(1 − c) p(1 − c)
for x ≥ K, 0 < p < 1, K > 0, the scale parameter, and c > 0, the shape parameter.

Usage

dpareto(x, K=1, c=1, log=FALSE)


ppareto(x, K=1, c=1, log.p=FALSE, lower.tail=TRUE)
varpareto(p, K=1, c=1, log.p=FALSE, lower.tail=TRUE)
espareto(p, K=1, c=1)
130 paretostable

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
K the value of the scale parameter, must be positive, the default is 1
c the value of the 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
x=runif(10,min=0,max=1)
dpareto(x)
ppareto(x)
varpareto(x)
espareto(x)

paretostable Pareto positive stable distribution

Description
Computes the pdf, cdf, value at risk and expected shortfall for the Pareto positive stable distribution
due to Sarabia and Prieto (2009) and Guillen et al. (2011) given by
νλ h  x iν−1 n h  x iν o
f (x) = log exp −λ log ,
x nσ h  x iν o σ
F (x) = 1 − exp −λ log ,
( σ 1/ν )
1
VaRp (X) = σ exp − log(1 − p) ,
λ
( 1/ν )
σ p
Z 
1
ESp (X) = exp − log(1 − v) dv
p 0 λ
paretostable 131

for x > 0, 0 < p < 1, λ > 0, the first scale parameter, σ > 0, the second scale parameter, and
ν > 0, the shape parameter.

Usage
dparetostable(x, lambda=1, nu=1, sigma=1, log=FALSE)
pparetostable(x, lambda=1, nu=1, sigma=1, log.p=FALSE, lower.tail=TRUE)
varparetostable(p, lambda=1, nu=1, sigma=1, log.p=FALSE, lower.tail=TRUE)
esparetostable(p, lambda=1, nu=1, sigma=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
lambda the value of the first scale parameter, must be positive, the default is 1
sigma the value of the second scale parameter, must be positive, the default is 1
nu the value of the 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
x=runif(10,min=0,max=1)
dparetostable(x)
pparetostable(x)
varparetostable(x)
esparetostable(x)
132 PCTAlaplace

PCTAlaplace Poiraud-Casanova-Thomas-Agnan Laplace distribution

Description
Computes the pdf, cdf, value at risk and expected shortfall for the Poiraud-Casanova-Thomas-
Agnan Laplace distribution due to Poiraud-Casanova and Thomas-Agnan (2000) given by

 a (1 − a) exp {(1 − a) (x − θ)} , if x ≤ θ,
f (x) =
 a (1 − a) exp {a (θ − x)} , if x > θ,

 a exp {(1 − a) (x − θ)} , if x ≤ θ,
F (x) =
1 − (1 − a) exp {a (θ − x)} , if x > θ,

 1 p
 θ + log , if p ≤ a,
1−a


 a
VaRp (X) =  
 1 1−p
 θ − log

 , if p > a,
 a 1−a
log a log p − 1
θ− + , if p ≤ a,


1−a (1 − a)p



ESp (X) =  

 1 1 a 1−p 1−p
θ − + − + log , if p > a


a p (1 − a)p ap 1−a

for −∞ < x < ∞, 0 < p < 1, −∞ < θ < ∞, the location parameter, and a > 0, the scale
parameter.

Usage
dPCTAlaplace(x, a=0.5, theta=0, log=FALSE)
pPCTAlaplace(x, a=0.5, theta=0, log.p=FALSE, lower.tail=TRUE)
varPCTAlaplace(p, a=0.5, theta=0, log.p=FALSE, lower.tail=TRUE)
esPCTAlaplace(p, a=0.5, theta=0)

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
theta the value of the location parameter, can take any real value, the default is zero
a the value of the scale parameter, must be in the unit interval, the default is 0.5
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
perks 133

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
x=runif(10,min=0,max=1)
dPCTAlaplace(x)
pPCTAlaplace(x)
varPCTAlaplace(x)
esPCTAlaplace(x)

perks Perks distribution

Description
Computes the pdf, cdf, value at risk and expected shortfall for the Perks distribution due to Perks
(1932) given by

a exp(bx) [1 + a]
f (x) = 2 ,
[1 + a exp(bx)]
1+a
F (x) = 1 − ,
1 + a exp(bx)
1 a+p
VaRp (X) = log ,
b a(1− p)
a log a (a + p) log(a + p) (1 − p) log(1 − p)
ESp (X) = − 1 + + +
p b bp bp

for x > 0, 0 < p < 1, a > 0, the first scale parameter and b > 0, the second scale parameter.

Usage
dperks(x, a=1, b=1, log=FALSE)
pperks(x, a=1, b=1, log.p=FALSE, lower.tail=TRUE)
varperks(p, a=1, b=1, log.p=FALSE, lower.tail=TRUE)
esperks(p, a=1, b=1)
134 power1

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
a the value of the first scale parameter, must be positive, the default is 1
b the value of the second scale 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
x=runif(10,min=0,max=1)
dperks(x)
pperks(x)
varperks(x)
esperks(x)

power1 Power function I distribution

Description
Computes the pdf, cdf, value at risk and expected shortfall for the power function I distribution
given by
f (x) = axa−1 ,
F (x) = xa ,
VaRp (X) = p1/a ,
p1/a
ESp (X) =
1/a + 1
for 0 < x < 1, 0 < p < 1, and a > 0, the shape parameter.
power1 135

Usage

dpower1(x, a=1, log=FALSE)


ppower1(x, a=1, log.p=FALSE, lower.tail=TRUE)
varpower1(p, a=1, log.p=FALSE, lower.tail=TRUE)
espower1(p, a=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
a the value of the 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

x=runif(10,min=0,max=1)
dpower1(x)
ppower1(x)
varpower1(x)
espower1(x)
136 power2

power2 Power function II distribution

Description
Computes the pdf, cdf, value at risk and expected shortfall for the power function II distribution
given by
f (x) = b(1 − x)b−1 ,
F (x) = 1 − (1 − x)b ,
1/b
VaRp (X) = 1 − (1  − p) 1/b+1
, 
b (1 − p) −1
ESp (X) = 1 +
p(b + 1)
for 0 < x < 1, 0 < p < 1, and b > 0, the shape parameter.

Usage
dpower2(x, b=1, log=FALSE)
ppower2(x, b=1, log.p=FALSE, lower.tail=TRUE)
varpower2(p, b=1, log.p=FALSE, lower.tail=TRUE)
espower2(p, 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
b the value of the 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
quad 137

Examples
x=runif(10,min=0,max=1)
dpower2(x)
ppower2(x)
varpower2(x)
espower2(x)

quad Quadratic distribution

Description
Computes the pdf, cdf, value at risk and expected shortfall for the quadratic distribution given by

f (x) = α(x − β)2 ,


α
(x − β)3 + (β − a)3 ,

F (x) =
3  1/3
3p 3
VaRp (X) = β + − (β − a) ,
α
( )
 4/3
α 3p 3 4
ESp (X) = β + − (β − a) − (β − a)
4p α

for a ≤ x ≤ b, 0 < p < 1, −∞ < a < ∞ , the first location parameter, and −∞ < a < b < ∞,
12 a+b
the second location parameter, where α = (b−a)3 and β = 2 .

Usage
dquad(x, a=0, b=1, log=FALSE)
pquad(x, a=0, b=1, log.p=FALSE, lower.tail=TRUE)
varquad(p, a=0, b=1, log.p=FALSE, lower.tail=TRUE)
esquad(p, a=0, 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
a the value of the first location parameter, can take any real value, the default is
zero
b the value of the second location parameter, can take any real value but must be
greater than a, 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
138 rgamma

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
x=runif(10,min=0,max=1)
dquad(x)
pquad(x)
varquad(x)
esquad(x)

rgamma Reflected gamma distribution

Description
Computes the pdf, cdf, value at risk and expected shortfall for the reflected gamma distribution due
to Borgi (1965) given by

x − θ a−1
 
1 x − θ
f (x) = exp − ,
2φΓ
 (a) φ

 φ
1 θ−x
 Q a, , if x ≤ θ,


 2
 φ
F (x) =  

 1 x−θ
 1 − Q a, , if x > θ,


 2 −1
φ
 θ − φQ (a, 2p) , if p ≤ 1/2,
VaRp (X) =
−1
 θ + φQ Z p (a, 2(1 − p)) , if p > 1/2,

 θ− φ
 Q−1 (a, 2v) dv, if p ≤ 1/2,


 p 0
ESp (X) =
φ 1/2 −1 φ p −1
 Z Z

 θ− Q (a, 2v) dv + Q (a, 2(1 − v)) dv, if p > 1/2


p 0 p 1/2

for −∞ < x < ∞, 0 < p < 1, −∞ < θ < ∞, the location parameter, φ > 0, the scale parameter,
and a > 0, the shape parameter.
rgamma 139

Usage

drgamma(x, a=1, theta=0, phi=1, log=FALSE)


prgamma(x, a=1, theta=0, phi=1, log.p=FALSE, lower.tail=TRUE)
varrgamma(p, a=1, theta=0, phi=1, log.p=FALSE, lower.tail=TRUE)
esrgamma(p, a=1, theta=0, phi=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
theta the value of the location parameter, can take any real value, the default is zero
phi the value of the scale parameter, must be positive, the default is 1
a the value of the 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

x=runif(10,min=0,max=1)
drgamma(x)
prgamma(x)
varrgamma(x)
esrgamma(x)
140 RS

RS Ramberg-Schmeiser distribution

Description
Computes the pdf, cdf, value at risk and expected shortfall for the Ramber-Schmeiser distribution
due to Ramberg and Schmeiser (1974) given by

pb − (1 − p)c
VaRp (X) = ,
b
d
p (1 − p)c+1 − 1
ESp (X) = +
d(b + 1) pd(c + 1)

for 0 < p < 1, b > 0, the first shape parameter, c > 0, the second shape parameter, and d > 0, the
scale parameter.

Usage
varRS(p, b=1, c=1, d=1, log.p=FALSE, lower.tail=TRUE)
esRS(p, b=1, c=1, d=1)

Arguments
p scaler or vector of values at which the value at risk or expected shortfall needs
to be computed
d the value of the scale parameter, must be positive, the default is 1
b the value of the first shape parameter, must be positive, the default is 1
c 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
schabe 141

Examples
x=runif(10,min=0,max=1)
varRS(x)
esRS(x)

schabe Schabe distribution

Description
Computes the pdf, cdf, value at risk and expected shortfall for the Schabe distribution due to Schabe
(1994) given by
2γ + (1 − γ)x/θ
f (x) = ,
θ(γ + x/θ)2
(1 + γ)x
F (x) = ,
x + γθ
pγθ
VaRp (X) = ,
1+γ−p
θγ(1 + γ) 1+γ−p
ESp (X) = −θγ − log
p 1+γ
for x > 0, 0 < p < 1, 0 < γ < 1, the first scale parameter, and θ > 0, the second scale parameter.

Usage
dschabe(x, gamma=0.5, theta=1, log=FALSE)
pschabe(x, gamma=0.5, theta=1, log.p=FALSE, lower.tail=TRUE)
varschabe(p, gamma=0.5, theta=1, log.p=FALSE, lower.tail=TRUE)
esschabe(p, gamma=0.5, theta=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
gamma the value of the first scale parameter, must be in the unit interval, the default is
0.5
theta the value of the second scale 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.
142 secant

Author(s)
Saralees Nadarajah

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

Examples
x=runif(10,min=0,max=1)
dschabe(x)
pschabe(x)
varschabe(x)
esschabe(x)

secant Hyperbolic secant distribution

Description
Computes the pdf, cdf, value at risk and expected shortfall for the hyperbolic secant distribution
given by
1  πx 
f (x) = sech ,
2 2h
2  πx i
F (x) = arctan exp ,
π  2πp i
2 h
VaRp (X) = log tan ,
πZ p 2 i
2 h πv
ESp (X) = log tan dv
πp 0 2
for −∞ < x < ∞, and 0 < p < 1.

Usage
dsecant(x, log=FALSE)
psecant(x, log.p=FALSE, lower.tail=TRUE)
varsecant(p, log.p=FALSE, lower.tail=TRUE)
essecant(p)

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
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
stacygamma 143

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
x=runif(10,min=0,max=1)
dsecant(x)
psecant(x)
varsecant(x)
essecant(x)

stacygamma Stacy distribution

Description
Computes the pdf, cdf, value at risk and expected shortfall for Stacy distribution due to Stacy (1962)
given by
cxcγ−1 exp [−(x/θ)c ]
f (x) = ,
θcγ Γ(γ)
  x c 
F (x) = 1 − Q γ, ,
 −1 θ 1/c
VaRp (X) = θZ Q (γ, 1 − p) ,
θ p  −1 1/c
ESp (X) = Q (γ, 1 − v) dv
p 0
for x > 0, 0 < p < 1, θ > 0, the scale parameter, c > 0, the first shape parameter, and γ > 0, the
second shape parameter.

Usage
dstacygamma(x, gamma=1, c=1, theta=1, log=FALSE)
pstacygamma(x, gamma=1, c=1, theta=1, log.p=FALSE, lower.tail=TRUE)
varstacygamma(p, gamma=1, c=1, theta=1, log.p=FALSE, lower.tail=TRUE)
esstacygamma(p, gamma=1, c=1, theta=1)
144 T

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
theta the value of the scale parameter, must be positive, the default is 1
c the value of the first scale parameter, must be positive, the default is 1
gamma the value of the second scale 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

x=runif(10,min=0,max=1)
dstacygamma(x)
pstacygamma(x)
varstacygamma(x)
esstacygamma(x)

T Student’s t distribution
T 145

Description
Computes the pdf, cdf, value at risk and expected shortfall for the Student’s t distribution due to
Gosset (1908) given by
− n+1
Γ n+1
 
2 x2 2

f (x) = √ 1 + ,
nπΓ n2

n  
1 + sign(x) sign(x) n 1
F (x) = − I 2n , ,
2 2 sx +n 2 2

 
1 1
VaRp (X) = nsign p − −1
 − 1,
2 Ia n2 , 12
where a = 2p if p < 1/2, a = 2(1 − p) if p ≥ 1/2,
√ Z p  s
n 1 1
ESp (X) = sign v −  − 1dv,
p 0 2 Ia−1 n2 , 21
where a = 2v if v < 1/2, a = 2(1 − v) if v ≥ 1/2

for −∞ < x < ∞, 0 < p < 1, and n > 0, the degree of freedom parameter.

Usage
dT(x, n=1, log=FALSE)
pT(x, n=1, log.p=FALSE, lower.tail=TRUE)
varT(p, n=1, log.p=FALSE, lower.tail=TRUE)
esT(p, n=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
n the value of the degree of freedom 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
146 TL

Examples
x=runif(10,min=0,max=1)
dT(x)
pT(x)
varT(x)
esT(x)

TL Tukey-Lambda distribution

Description
Computes the pdf, cdf, value at risk and expected shortfall for the Tukey-Lambda distribution due
to Tukey (1962) given by

pλ − (1 − p)λ
VaRp (X) = ,
λ+1
λ λ+1
p + (1 − p) −1
ESp (X) =
pλ(λ + 1)

for 0 < p < 1, and λ > 0, the shape parameter.

Usage
varTL(p, lambda=1, log.p=FALSE, lower.tail=TRUE)
esTL(p, lambda=1)

Arguments
p scaler or vector of values at which the value at risk or expected shortfall needs
to be computed
lambda the value of the 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
TL2 147

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

Examples
x=runif(10,min=0,max=1)
varTL(x)
esTL(x)

TL2 Topp-Leone distribution

Description
Computes the pdf, cdf, value at risk and expected shortfall for the Topp-Leone distribution due to
Topp and Leone (1955) given by

f (x) = 2b(x(2 − x))b−1 (1 − x),


b
F (x) = (x(2 − x))
p,
VaRp (X) = 1 − 1 −  p1/b , 
b 3
ESp (X) = 1 − Bp1/b b,
p 2
for x > 0, 0 < p < 1, and b > 0, the shape parameter.

Usage
dTL2(x, b=1, log=FALSE)
pTL2(x, b=1, log.p=FALSE, lower.tail=TRUE)
varTL2(p, b=1, log.p=FALSE, lower.tail=TRUE)
esTL2(p, 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
b the value of the 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.
148 triangular

Author(s)
Saralees Nadarajah

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

Examples
x=runif(10,min=0,max=1)
dTL2(x)
pTL2(x)
varTL2(x)
esTL2(x)

triangular Triangular distribution

Description
Computes the pdf, cdf, value at risk and expected shortfall for the triangular distribution given by


 0, if x < a,





 2(x − a)
, if a ≤ x ≤ c,


 (b − a)(c − a)


f (x) =

 2(b − x)
, if c < x ≤ b,


 (b − a)(b − c)







 0, if b < x,


 0, if x < a,



(x − a)2



, if a ≤ x ≤ c,


 (b − a)(c − a)


F (x) =
(b − x)2


1 − , if c < x ≤ b,


(b − a)(b − c)








1, if b < x,

p
 a + p(b − a)(c − a),
 if 0 < p < c−a
b−a ,
VaRp (X) = p
 b − (1 − p)(b − a)(b − c), if c−a ≤ p < 1,

b−a
2p


 a+ p(b − a)(c − a), if 0 < p < c−a
b−a ,

 3
ESp (X) =
3/2
 b + a − c + 2(2c − a − b) + 2p(b − a)(b − c) (1 − p) , if c−a ≤ p < 1


 b−a
p 3p 3p
triangular 149

for a ≤ x ≤ b, 0 < p < 1, −∞ < a < ∞, the first location parameter, −∞ < a < c < ∞, the
second location parameter, and −∞ < c < b < ∞, the third location parameter.

Usage
dtriangular(x, a=0, b=2, c=1, log=FALSE)
ptriangular(x, a=0, b=2, c=1, log.p=FALSE, lower.tail=TRUE)
vartriangular(p, a=0, b=2, c=1, log.p=FALSE, lower.tail=TRUE)
estriangular(p, a=0, b=2, c=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
a the value of the first location parameter, can take any real value, the default is
zero
c the value of the second location parameter, can take any real value but must be
greater than a, the default is 1
b the value of the third location parameter, can take any real value but must be
greater than c, the default is 2
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
x=runif(10,min=0,max=1)
dtriangular(x)
ptriangular(x)
vartriangular(x)
estriangular(x)
150 tsp

tsp Two sided power distribution

Description
Computes the pdf, cdf, value at risk and expected shortfall for the two sided power distribution due
to van Dorp and Kotz (2002) given by
  x a−1
 a
 , if 0 < x ≤ θ,
f (x) = θ a−1
1−x
 a
 , if θ < x < 1,
1−θ
 x a
 θ
 , if 0 < x ≤ θ,
θ a
F (x) = 
1 − x
 1 − (1 − θ)
 , if θ < x < 1,
   1−θ
p 1/a
 θ , if 0 < p ≤ θ,


θ
VaRp (X) =  1/a
1−p
 1 − (1 − θ) , if θ < p < 1,


 1−θ
aθ  p 1/a


 , if 0 < p ≤ θ,
a+1 θ

ESp (X) = 1+1/a
θ a(2θ − 1) a(1 − θ)2 1 − p
 
 1− + + , if θ < p < 1


p (a + 1)p (a + 1)p 1 − θ

for 0 < x < 1, 0 < p < 1, a > 0, the shape parameter, and −∞ < θ < ∞, the location parameter.

Usage
dtsp(x, a=1, theta=0.5, log=FALSE)
ptsp(x, a=1, theta=0.5, log.p=FALSE, lower.tail=TRUE)
vartsp(p, a=1, theta=0.5, log.p=FALSE, lower.tail=TRUE)
estsp(p, a=1, theta=0.5)

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
theta the value of the location parameter, must take a value in the unit interval, the
default is 0.5
a the value of the 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
uniform 151

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
x=runif(10,min=0,max=1)
dtsp(x)
ptsp(x)
vartsp(x)
estsp(x)

uniform Uniform distribution

Description

Computes the pdf, cdf, value at risk and expected shortfall for the uniform distribution given by

1
f (x) = ,
b−a
x−a
F (x) = ,
b−a
VaRp (X) = a + p(b − a),
p
ESp (X) = a + (b − a)
2
for a < x < b, 0 < p < 1, −∞ < a < ∞ , the first location parameter, and −∞ < a < b < ∞ ,
the second location parameter.

Usage

duniform(x, a=0, b=1, log=FALSE)


puniform(x, a=0, b=1, log.p=FALSE, lower.tail=TRUE)
varuniform(p, a=0, b=1, log.p=FALSE, lower.tail=TRUE)
esuniform(p, a=0, b=1)
152 weibull

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
a the value of the first location parameter, can take any real value, the default is
zero
b the value of the second location parameter, can take any real value but must be
greater than a, 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
x=runif(10,min=0,max=1)
duniform(x)
puniform(x)
varuniform(x)
esuniform(x)

weibull Weibull distribution

Description
Computes the pdf, cdf, value at risk and expected shortfall for the Weibull distribution due to
Weibull (1951) given by
αxα−1 n  x α o
f (x) = exp − ,
σα n  x σαo
F (x) = 1 − exp − ,
σ
1/α
VaRp (X) = σ [− log(1 − p)] ,
σ
ESp (X) = γ (1 + 1/α, − log(1 − p))
p
weibull 153

for x > 0, 0 < p < 1, α > 0, the shape parameter, and σ > 0, the scale parameter.

Usage

dWeibull(x, alpha=1, sigma=1, log=FALSE)


pWeibull(x, alpha=1, sigma=1, log.p=FALSE, lower.tail=TRUE)
varWeibull(p, alpha=1, sigma=1, log.p=FALSE, lower.tail=TRUE)
esWeibull(p, alpha=1, sigma=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
sigma the value of the scale parameter, must be positive, the default is 1
alpha the value of the 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
x=runif(10,min=0,max=1)
dWeibull(x)
pWeibull(x)
varWeibull(x)
esWeibull(x)
154 xie

xie Xie distribution

Description
Computes the pdf, cdf, value at risk and expected shortfall for the Xie distribution due to Xie et al.
(2002) given by
 x b−1
exp (x/a)b exp (λa) exp −λa exp (x/a)b ,
    
f (x) = λb
a
F (x) = 1 − exp (λa) exp −λa exp (x/a)b ,
  
  1/b
log(1 − p)
VaRp (X) = a log 1 − ,
λa
Z p  1/b
a log(1 − v)
ESp (X) = log 1 − dv
p 0 λa
for x > 0, 0 < p < 1, a > 0, the first scale parameter, b > 0, the shape parameter, and λ > 0, the
second scale parameter.

Usage
dxie(x, a=1, b=1, lambda=1, log=FALSE)
pxie(x, a=1, b=1, lambda=1, log.p=FALSE, lower.tail=TRUE)
varxie(p, a=1, b=1, lambda=1, log.p=FALSE, lower.tail=TRUE)
esxie(p, a=1, b=1, lambda=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
a the value of the first scale parameter, must be positive, the default is 1
lambda the value of the second scale parameter, must be positive, the default is 1
b the value of the 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
xie 155

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

Examples
x=runif(10,min=0,max=1)
dxie(x)
pxie(x)
varxie(x)
esxie(x)
Index

∗Topic Valueat risk, expected F, 55


shortfall FR, 56
aep, 4 frechet, 57
arcsine, 6 Gamma, 59
ast, 8 genbeta, 60
asylaplace, 9 genbeta2, 61
asypower, 11 geninvbeta, 63
beard, 13 genlogis, 64
betaburr, 15 genlogis3, 65
betaburr7, 16 genlogis4, 67
betadist, 17 genpareto, 68
betaexp, 19 genpowerweibull, 69
betafrechet, 20 genunif, 71
betagompertz, 21 gev, 72
betagumbel, 23 gompertz, 73
betagumbel2, 24 gumbel, 75
betalognorm, 25 gumbel2, 76
betalomax, 26 halfcauchy, 77
betanorm, 28 halflogis, 78
betapareto, 29 halfnorm, 80
betaweibull, 30 halfT, 81
BS, 32 HBlaplace, 82
burr, 33 HL, 83
burr7, 34 Hlogis, 84
Cauchy, 35 invbeta, 86
chen, 37 invexpexp, 87
clg, 38 invgamma, 88
compbeta, 39 kum, 89
dagum, 41 kumburr7, 91
dweibull, 42 kumexp, 92
expexp, 44 kumgamma, 93
expext, 45 kumgumbel, 95
expgeo, 46 kumhalfnorm, 96
explog, 47 kumloglogis, 97
explogis, 49 kumnormal, 99
exponential, 50 kumpareto, 100
exppois, 51 kumweibull, 102
exppower, 52 laplace, 103
expweibull, 54 lfr, 104

156
INDEX 157

LNbeta, 106 betaburr7, 16


logbeta, 107 betadist, 17
logcauchy, 108 betaexp, 19
loggamma, 109 betafrechet, 20
logisexp, 111 betagompertz, 21
logisrayleigh, 112 betagumbel, 23
logistic, 113 betagumbel2, 24
loglaplace, 114 betalognorm, 25
loglog, 116 betalomax, 26
loglogis, 117 betanorm, 28
lognorm, 119 betapareto, 29
lomax, 120 betaweibull, 30
Mlaplace, 121 BS, 32
moexp, 123 burr, 33
moweibull, 124 burr7, 34
MRbeta, 125
nakagami, 127 Cauchy, 35
normal, 128 chen, 37
pareto, 129 clg, 38
paretostable, 130 compbeta, 39
PCTAlaplace, 132
perks, 133 daep (aep), 4
power1, 134 dagum, 41
power2, 136 darcsine (arcsine), 6
quad, 137 dast (ast), 8
rgamma, 138 dasylaplace (asylaplace), 9
RS, 140 dasypower (asypower), 11
schabe, 141 dbeard (beard), 13
secant, 142 dbetaburr (betaburr), 15
stacygamma, 143 dbetaburr7 (betaburr7), 16
T, 144 dbetadist (betadist), 17
TL, 146 dbetaexp (betaexp), 19
TL2, 147 dbetafrechet (betafrechet), 20
triangular, 148 dbetagompertz (betagompertz), 21
tsp, 150 dbetagumbel (betagumbel), 23
uniform, 151 dbetagumbel2 (betagumbel2), 24
weibull, 152 dbetalognorm (betalognorm), 25
xie, 154 dbetalomax (betalomax), 26
∗Topic package dbetanorm (betanorm), 28
VaRES-package, 4 dbetapareto (betapareto), 29
dbetaweibull (betaweibull), 30
aep, 4 dBS (BS), 32
arcsine, 6 dburr (burr), 33
ast, 8 dburr7 (burr7), 34
asylaplace, 9 dCauchy (Cauchy), 35
asypower, 11 dchen (chen), 37
dclg (clg), 38
beard, 13 dcompbeta (compbeta), 39
betaburr, 15 ddagum (dagum), 41
158 INDEX

ddweibull (dweibull), 42 dlogbeta (logbeta), 107


dexpexp (expexp), 44 dlogcauchy (logcauchy), 108
dexpext (expext), 45 dloggamma (loggamma), 109
dexpgeo (expgeo), 46 dlogisexp (logisexp), 111
dexplog (explog), 47 dlogisrayleigh (logisrayleigh), 112
dexplogis (explogis), 49 dlogistic (logistic), 113
dexponential (exponential), 50 dloglaplace (loglaplace), 114
dexppois (exppois), 51 dloglog (loglog), 116
dexppower (exppower), 52 dloglogis (loglogis), 117
dexpweibull (expweibull), 54 dlognorm (lognorm), 119
dF (F), 55 dlomax (lomax), 120
dfrechet (frechet), 57 dMlaplace (Mlaplace), 121
dGamma (Gamma), 59 dmoexp (moexp), 123
dgenbeta (genbeta), 60 dmoweibull (moweibull), 124
dgenbeta2 (genbeta2), 61 dMRbeta (MRbeta), 125
dgeninvbeta (geninvbeta), 63 dnakagami (nakagami), 127
dgenlogis (genlogis), 64 dnormal (normal), 128
dgenlogis3 (genlogis3), 65 dpareto (pareto), 129
dgenlogis4 (genlogis4), 67 dparetostable (paretostable), 130
dgenpareto (genpareto), 68 dPCTAlaplace (PCTAlaplace), 132
dgenpowerweibull (genpowerweibull), 69 dperks (perks), 133
dgenunif (genunif), 71 dpower1 (power1), 134
dgev (gev), 72 dpower2 (power2), 136
dgompertz (gompertz), 73 dquad (quad), 137
drgamma (rgamma), 138
dgumbel (gumbel), 75
dschabe (schabe), 141
dgumbel2 (gumbel2), 76
dsecant (secant), 142
dhalfcauchy (halfcauchy), 77
dstacygamma (stacygamma), 143
dhalflogis (halflogis), 78
dT (T), 144
dhalfnorm (halfnorm), 80
dTL2 (TL2), 147
dhalfT (halfT), 81
dtriangular (triangular), 148
dHBlaplace (HBlaplace), 82
dtsp (tsp), 150
dHlogis (Hlogis), 84
duniform (uniform), 151
dinvbeta (invbeta), 86
dWeibull (weibull), 152
dinvexpexp (invexpexp), 87 dweibull, 42
dinvgamma (invgamma), 88 dxie (xie), 154
dkum (kum), 89
dkumburr7 (kumburr7), 91 esaep (aep), 4
dkumexp (kumexp), 92 esarcsine (arcsine), 6
dkumgamma (kumgamma), 93 esast (ast), 8
dkumgumbel (kumgumbel), 95 esasylaplace (asylaplace), 9
dkumhalfnorm (kumhalfnorm), 96 esasypower (asypower), 11
dkumloglogis (kumloglogis), 97 esbeard (beard), 13
dkumnormal (kumnormal), 99 esbetaburr (betaburr), 15
dkumpareto (kumpareto), 100 esbetaburr7 (betaburr7), 16
dkumweibull (kumweibull), 102 esbetadist (betadist), 17
dlaplace (laplace), 103 esbetaexp (betaexp), 19
dlfr (lfr), 104 esbetafrechet (betafrechet), 20
dLNbeta (LNbeta), 106 esbetagompertz (betagompertz), 21
INDEX 159

esbetagumbel (betagumbel), 23 esHlogis (Hlogis), 84


esbetagumbel2 (betagumbel2), 24 esinvbeta (invbeta), 86
esbetalognorm (betalognorm), 25 esinvexpexp (invexpexp), 87
esbetalomax (betalomax), 26 esinvgamma (invgamma), 88
esbetanorm (betanorm), 28 eskum (kum), 89
esbetapareto (betapareto), 29 eskumburr7 (kumburr7), 91
esbetaweibull (betaweibull), 30 eskumexp (kumexp), 92
esBS (BS), 32 eskumgamma (kumgamma), 93
esburr (burr), 33 eskumgumbel (kumgumbel), 95
esburr7 (burr7), 34 eskumhalfnorm (kumhalfnorm), 96
esCauchy (Cauchy), 35 eskumloglogis (kumloglogis), 97
eschen (chen), 37 eskumnormal (kumnormal), 99
esclg (clg), 38 eskumpareto (kumpareto), 100
escompbeta (compbeta), 39 eskumweibull (kumweibull), 102
esdagum (dagum), 41 eslaplace (laplace), 103
esdweibull (dweibull), 42 eslfr (lfr), 104
esexpexp (expexp), 44 esLNbeta (LNbeta), 106
esexpext (expext), 45 eslogbeta (logbeta), 107
esexpgeo (expgeo), 46 eslogcauchy (logcauchy), 108
esexplog (explog), 47 esloggamma (loggamma), 109
esexplogis (explogis), 49 eslogisexp (logisexp), 111
esexponential (exponential), 50 eslogisrayleigh (logisrayleigh), 112
esexppois (exppois), 51 eslogistic (logistic), 113
esexppower (exppower), 52 esloglaplace (loglaplace), 114
esexpweibull (expweibull), 54 esloglog (loglog), 116
esF (F), 55 esloglogis (loglogis), 117
esFR (FR), 56 eslognorm (lognorm), 119
esfrechet (frechet), 57 eslomax (lomax), 120
esGamma (Gamma), 59 esMlaplace (Mlaplace), 121
esgenbeta (genbeta), 60 esmoexp (moexp), 123
esgenbeta2 (genbeta2), 61 esmoweibull (moweibull), 124
esgeninvbeta (geninvbeta), 63 esMRbeta (MRbeta), 125
esgenlogis (genlogis), 64 esnakagami (nakagami), 127
esgenlogis3 (genlogis3), 65 esnormal (normal), 128
esgenlogis4 (genlogis4), 67 espareto (pareto), 129
esgenpareto (genpareto), 68 esparetostable (paretostable), 130
esgenpowerweibull (genpowerweibull), 69 esPCTAlaplace (PCTAlaplace), 132
esgenunif (genunif), 71 esperks (perks), 133
esgev (gev), 72 espower1 (power1), 134
esgompertz (gompertz), 73 espower2 (power2), 136
esgumbel (gumbel), 75 esquad (quad), 137
esgumbel2 (gumbel2), 76 esrgamma (rgamma), 138
eshalfcauchy (halfcauchy), 77 esRS (RS), 140
eshalflogis (halflogis), 78 esschabe (schabe), 141
eshalfnorm (halfnorm), 80 essecant (secant), 142
eshalfT (halfT), 81 esstacygamma (stacygamma), 143
esHBlaplace (HBlaplace), 82 esT (T), 144
esHL (HL), 83 esTL (TL), 146
160 INDEX

esTL2 (TL2), 147 kumexp, 92


estriangular (triangular), 148 kumgamma, 93
estsp (tsp), 150 kumgumbel, 95
esuniform (uniform), 151 kumhalfnorm, 96
esWeibull (weibull), 152 kumloglogis, 97
esxie (xie), 154 kumnormal, 99
expexp, 44 kumpareto, 100
expext, 45 kumweibull, 102
expgeo, 46
explog, 47 laplace, 103
explogis, 49 lfr, 104
exponential, 50 LNbeta, 106
exppois, 51 logbeta, 107
exppower, 52 logcauchy, 108
expweibull, 54 loggamma, 109
logisexp, 111
F, 55 logisrayleigh, 112
FR, 56 logistic, 113
frechet, 57 loglaplace, 114
loglog, 116
Gamma, 59 loglogis, 117
genbeta, 60 lognorm, 119
genbeta2, 61 lomax, 120
geninvbeta, 63
genlogis, 64 Mlaplace, 121
genlogis3, 65 moexp, 123
genlogis4, 67 moweibull, 124
genpareto, 68 MRbeta, 125
genpowerweibull, 69
genunif, 71 nakagami, 127
gev, 72 normal, 128
gompertz, 73
gumbel, 75 paep (aep), 4
gumbel2, 76 parcsine (arcsine), 6
pareto, 129
halfcauchy, 77 paretostable, 130
halflogis, 78 past (ast), 8
halfnorm, 80 pasylaplace (asylaplace), 9
halfT, 81 pasypower (asypower), 11
HBlaplace, 82 pbeard (beard), 13
HL, 83 pbetaburr (betaburr), 15
Hlogis, 84 pbetaburr7 (betaburr7), 16
pbetadist (betadist), 17
invbeta, 86 pbetaexp (betaexp), 19
invexpexp, 87 pbetafrechet (betafrechet), 20
invgamma, 88 pbetagompertz (betagompertz), 21
pbetagumbel (betagumbel), 23
kum, 89 pbetagumbel2 (betagumbel2), 24
kumburr7, 91 pbetalognorm (betalognorm), 25
INDEX 161

pbetalomax (betalomax), 26 pinvgamma (invgamma), 88


pbetanorm (betanorm), 28 pkum (kum), 89
pbetapareto (betapareto), 29 pkumburr7 (kumburr7), 91
pbetaweibull (betaweibull), 30 pkumexp (kumexp), 92
pBS (BS), 32 pkumgamma (kumgamma), 93
pburr (burr), 33 pkumgumbel (kumgumbel), 95
pburr7 (burr7), 34 pkumhalfnorm (kumhalfnorm), 96
pCauchy (Cauchy), 35 pkumloglogis (kumloglogis), 97
pchen (chen), 37 pkumnormal (kumnormal), 99
pclg (clg), 38 pkumpareto (kumpareto), 100
pcompbeta (compbeta), 39 pkumweibull (kumweibull), 102
PCTAlaplace, 132 plaplace (laplace), 103
pdagum (dagum), 41 plfr (lfr), 104
pdweibull (dweibull), 42 pLNbeta (LNbeta), 106
perks, 133 plogbeta (logbeta), 107
pexpexp (expexp), 44 plogcauchy (logcauchy), 108
pexpext (expext), 45 ploggamma (loggamma), 109
pexpgeo (expgeo), 46 plogisexp (logisexp), 111
pexplog (explog), 47 plogisrayleigh (logisrayleigh), 112
pexplogis (explogis), 49 plogistic (logistic), 113
pexponential (exponential), 50 ploglaplace (loglaplace), 114
pexppois (exppois), 51 ploglog (loglog), 116
pexppower (exppower), 52 ploglogis (loglogis), 117
pexpweibull (expweibull), 54 plognorm (lognorm), 119
pF (F), 55 plomax (lomax), 120
pfrechet (frechet), 57 pMlaplace (Mlaplace), 121
pGamma (Gamma), 59 pmoexp (moexp), 123
pgenbeta (genbeta), 60 pmoweibull (moweibull), 124
pgenbeta2 (genbeta2), 61 pMRbeta (MRbeta), 125
pgeninvbeta (geninvbeta), 63 pnakagami (nakagami), 127
pgenlogis (genlogis), 64 pnormal (normal), 128
pgenlogis3 (genlogis3), 65 power1, 134
pgenlogis4 (genlogis4), 67 power2, 136
pgenpareto (genpareto), 68 ppareto (pareto), 129
pgenpowerweibull (genpowerweibull), 69 pparetostable (paretostable), 130
pgenunif (genunif), 71 pPCTAlaplace (PCTAlaplace), 132
pgev (gev), 72 pperks (perks), 133
pgompertz (gompertz), 73 ppower1 (power1), 134
pgumbel (gumbel), 75 ppower2 (power2), 136
pgumbel2 (gumbel2), 76 pquad (quad), 137
phalfcauchy (halfcauchy), 77 prgamma (rgamma), 138
phalflogis (halflogis), 78 pschabe (schabe), 141
phalfnorm (halfnorm), 80 psecant (secant), 142
phalfT (halfT), 81 pstacygamma (stacygamma), 143
pHBlaplace (HBlaplace), 82 pT (T), 144
pHlogis (Hlogis), 84 pTL2 (TL2), 147
pinvbeta (invbeta), 86 ptriangular (triangular), 148
pinvexpexp (invexpexp), 87 ptsp (tsp), 150
162 INDEX

puniform (uniform), 151 VaRES-package, 4


pWeibull (weibull), 152 varexpexp (expexp), 44
pxie (xie), 154 varexpext (expext), 45
varexpgeo (expgeo), 46
quad, 137 varexplog (explog), 47
varexplogis (explogis), 49
rgamma, 138
varexponential (exponential), 50
RS, 140
varexppois (exppois), 51
schabe, 141 varexppower (exppower), 52
secant, 142 varexpweibull (expweibull), 54
stacygamma, 143 varF (F), 55
varFR (FR), 56
T, 144 varfrechet (frechet), 57
TL, 146 varGamma (Gamma), 59
TL2, 147 vargenbeta (genbeta), 60
triangular, 148 vargenbeta2 (genbeta2), 61
tsp, 150 vargeninvbeta (geninvbeta), 63
vargenlogis (genlogis), 64
uniform, 151 vargenlogis3 (genlogis3), 65
vargenlogis4 (genlogis4), 67
varaep (aep), 4
vargenpareto (genpareto), 68
vararcsine (arcsine), 6
vargenpowerweibull (genpowerweibull), 69
varast (ast), 8
vargenunif (genunif), 71
varasylaplace (asylaplace), 9
vargev (gev), 72
varasypower (asypower), 11
varbeard (beard), 13 vargompertz (gompertz), 73
varbetaburr (betaburr), 15 vargumbel (gumbel), 75
varbetaburr7 (betaburr7), 16 vargumbel2 (gumbel2), 76
varbetadist (betadist), 17 varhalfcauchy (halfcauchy), 77
varbetaexp (betaexp), 19 varhalflogis (halflogis), 78
varbetafrechet (betafrechet), 20 varhalfnorm (halfnorm), 80
varbetagompertz (betagompertz), 21 varhalfT (halfT), 81
varbetagumbel (betagumbel), 23 varHBlaplace (HBlaplace), 82
varbetagumbel2 (betagumbel2), 24 varHL (HL), 83
varbetalognorm (betalognorm), 25 varHlogis (Hlogis), 84
varbetalomax (betalomax), 26 varinvbeta (invbeta), 86
varbetanorm (betanorm), 28 varinvexpexp (invexpexp), 87
varbetapareto (betapareto), 29 varinvgamma (invgamma), 88
varbetaweibull (betaweibull), 30 varkum (kum), 89
varBS (BS), 32 varkumburr7 (kumburr7), 91
varburr (burr), 33 varkumexp (kumexp), 92
varburr7 (burr7), 34 varkumgamma (kumgamma), 93
varCauchy (Cauchy), 35 varkumgumbel (kumgumbel), 95
varchen (chen), 37 varkumhalfnorm (kumhalfnorm), 96
varclg (clg), 38 varkumloglogis (kumloglogis), 97
varcompbeta (compbeta), 39 varkumnormal (kumnormal), 99
vardagum (dagum), 41 varkumpareto (kumpareto), 100
vardweibull (dweibull), 42 varkumweibull (kumweibull), 102
VaRES (VaRES-package), 4 varlaplace (laplace), 103
INDEX 163

varlfr (lfr), 104


varLNbeta (LNbeta), 106
varlogbeta (logbeta), 107
varlogcauchy (logcauchy), 108
varloggamma (loggamma), 109
varlogisexp (logisexp), 111
varlogisrayleigh (logisrayleigh), 112
varlogistic (logistic), 113
varloglaplace (loglaplace), 114
varloglog (loglog), 116
varloglogis (loglogis), 117
varlognorm (lognorm), 119
varlomax (lomax), 120
varMlaplace (Mlaplace), 121
varmoexp (moexp), 123
varmoweibull (moweibull), 124
varMRbeta (MRbeta), 125
varnakagami (nakagami), 127
varnormal (normal), 128
varpareto (pareto), 129
varparetostable (paretostable), 130
varPCTAlaplace (PCTAlaplace), 132
varperks (perks), 133
varpower1 (power1), 134
varpower2 (power2), 136
varquad (quad), 137
varrgamma (rgamma), 138
varRS (RS), 140
varschabe (schabe), 141
varsecant (secant), 142
varstacygamma (stacygamma), 143
varT (T), 144
varTL (TL), 146
varTL2 (TL2), 147
vartriangular (triangular), 148
vartsp (tsp), 150
varuniform (uniform), 151
varWeibull (weibull), 152
varxie (xie), 154

weibull, 152

xie, 154

You might also like