GenPareto: The Generalized Pareto Distribution

Description Usage Arguments Details Value Author(s) Examples

Description

Density, distribution function, quantile function and random generation for the Generalized Pareto distribution with parameters mu, sigma, and xi.

Usage

1
2
3
4
5
6
7
8
9
dgpd(x, mu = 0, sigma = 1, xi = 1, log = F)

mgpd(x, mu = 0, sigma = 1, xi = 1, log = F)

pgpd(q, mu = 0, sigma = 1, xi = 1, lower.tail = T)

qgpd(p, mu = 0, sigma = 1, xi = 1, lower.tail = T)

rgpd(n, mu = 0, sigma = 1, xi = 1)

Arguments

x, q

vector of quantiles.

mu

location parameter.

sigma

(non-negative) scale parameter.

xi

shape parameter.

log

logical; if TRUE, probabilities p are given as log(p).

lower.tail

logical; if TRUE, probabilities are P[X ≤ x], otherwise, P[X > x].

p

numeric predictor matrix.

n

number of random values to return.

Details

The generalized pareto distribution has density

f(x) = sigma^(1/xi) / (sigma + xi*(x-mu))^(1/xi + 1)

Value

dgpd gives the continuous density, pgpd gives the distribution function, qgpd gives the quantile function, and rgpd generates random deviates.

mgpd gives a probability mass function for a discretized version of GPD.

Author(s)

Taylor Trippe <ttrippe@luc.edu>
Earvin Balderama <ebalderama@luc.edu>

Examples

1
2
3
4
5
6
dexp(1,rate=.5) #Exp(rate) equivalent to gpd with mu=0 AND xi=0, and sigma=1/rate.
dgpd(1,mu=0,sigma=2,xi=0) #cannot take xi=0.
dgpd(1,mu=0,sigma=2,xi=0.0000001) #but can get close.

##"mass" function of GPD
mgpd(8) == pgpd(8.5) - pgpd(7.5)

Example output

[1] 0.3032653
[1] NaN
[1] 0.3032653
[1] TRUE

hurdlr documentation built on May 2, 2019, 3:19 p.m.

Related to GenPareto in hurdlr...