Skip to contents

R arm of morie.fn.gpdD and gpfit. GpdDistribution: CDF, density, quantiles, mean and variance of the GPD \(F(x) = 1 - (1 + \xi x/\sigma)^{-1/\xi}\). Gpfit: peaks over threshold, the maximum likelihood fit of the excesses over threshold (default the type-7 90th percentile), started from morie_evt_gpd_mle and refined by Newton steps on the analytic score and Hessian; standard errors from the observed information.

Usage

GpdDistribution(sigma, xi, x = c(0.5, 1, 2, 4), p = c(0.5, 0.9, 0.95, 0.99))

Gpfit(x, threshold = NULL)

Arguments

sigma

Scale, positive.

xi

Shape.

x

Points (GpdDistribution) or raw observations (Gpfit).

p

Probabilities.

threshold

Threshold.

Value

A list (the Python payload).

References

Pickands, J. (1975). Statistical inference using extreme order statistics. Annals of Statistics 3, 119-131.

Coles, S. (2001). An Introduction to Statistical Modeling of Extreme Values. Springer.

Examples

GpdDistribution(2, 0.25, x = c(1, 3), p = c(0.5, 0.9))$cdf
#> [1] 0.3757049 0.7202377
Gpfit(c(0.2, 1.4, 0.7, 2.9, 0.3, 5.1, 1.1, 0.9, 3.8, 0.5, 2.2, 7.4, 1.8, 0.6, 4.3), 0.5)$shape
#> [1] -0.1801363