Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

gev2frech

Transforms GEV data to unit Frechet ones and vice versa


Description

Transforms GEV data to unit Frechet ones and vice versa

Usage

gev2frech(x, loc, scale, shape, emp = FALSE)
frech2gev(x, loc, scale, shape)

Arguments

x

The data to be transformed to unit Frechet or ordinary GEV margins

loc, scale, shape

The location, scale and shape parameters of the GEV.

emp

Logical. If TRUE, data are transformed to unit Frechet margins using the empirical CDF.

Details

If Y is a random variable with a GEV distribution with location μ, scale σ and shape ξ. Then,

Z = [1 + ξ (Y - μ) / σ]_+^(1/ξ)

is unit Frechet distributed - where x_+ = max(0, x).

If Z is a unit Frechet random variable. Then,

Y = μ + σ (Z_+^(ξ) - 1) / ξ

is unit GEV distributed with location, scale and shape parameters equal to μ, σ and ξ respectively.

Value

Returns a numeric vector with the same length of x

Author(s)

Mathieu Ribatet

Examples

x <- c(2.2975896, 1.6448808, 1.3323833, -0.4464904, 2.2737603,
    -0.2581876, 9.5184398, -0.5899699, 0.4974283, -0.8152157)
y <- gev2frech(x, 1, 2, .2)
y
frech2gev(y, 1, 2, .2)

SpatialExtremes

Modelling Spatial Extremes

v2.0-9
GPL (>= 2)
Authors
Mathieu Ribatet [aut, cre], Richard Singleton [ctb], R Core team [ctb]
Initial release
2020-09-22

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.