rgpd: Fast Simulation of Generalized Pareto Distribution

Description Usage Arguments Value Note Author(s) See Also Examples

View source: R/rgpd.R

Description

The function rgpd generates Generalized Pareto Random Variables.

Usage

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

Arguments

n

integer, number of simulations.

xi

double, the shape.

mu

double, the location.

sigma

double, the scale.

Value

A vector of i.i.d. Generalized Pareto random variables.

Note

For xi != 0, the cumulative distribution function is:

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

for x >= mu when xi > 0 and mu <= x <= mu - sigma/xi when xi < 0.

If xi = 0, (X - mu)/sigma follows a Exponential distribution of parameter 1.

Author(s)

Nicolas Baradel - PGM Solutions

See Also

http://pgm-solutions.com/packages

Examples

1
x <- rgpd(5, 1)

Example output



rpgm documentation built on March 18, 2018, 2:24 p.m.