Learn R Programming

distionary (version 0.1.0)

dst_gp: Generalised Pareto Distribution

Description

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

Usage

dst_gp(scale, shape)

Value

A Generalised Pareto Distribution.

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.

Examples

Run this code
# Short-tailed example
short <- dst_gp(1, -1)
range(short)
mean(short)

# Heavy-tailed example
heavy <- dst_gp(1, 1)
range(heavy)
mean(heavy)

# Light-tailed example (a Gumbel distribution)
light <- dst_gp(1, 0)
range(light)
mean(light)

Run the code above in your browser using DataLab