Skip to contents

Makes a Generalized Pareto distribution (GPD), corresponding to the limiting distribution of excesses over a threshold.

Usage

dst_gpd(scale, shape)

Arguments

scale

Scale parameter; single positive numeric.

shape

Shape parameter; single positive numeric. This is also the extreme value index, so that shape > 0 is heavy tailed, and shape < 0 is short-tailed.

Value

A Generalised Pareto Distribution.

Examples

# Short-tailed example
short <- dst_gpd(1, -1)
range(short)
#> [1] 0 1
mean(short)
#> [1] 0.5

# Heavy-tailed example
heavy <- dst_gpd(1, 1)
range(heavy)
#> [1]   0 Inf
mean(heavy)
#> [1] Inf

# Light-tailed example (a Gumbel distribution)
light <- dst_gpd(1, 0)
range(light)
#> [1]   0 Inf
mean(light)
#> [1] 1