View source: R/util-FrechtoGPD.R
gpd2frech | R Documentation |
Transforms GPD observations to unit Frechet ones and vice versa
gpd2frech(x, loc = 0, scale = 1, shape = 0, pat = 1)
frech2gpd(z, loc = 0, scale = 1, shape = 0, pat = 1)
x , z |
The vector of observations. |
loc , scale , shape |
The location, scale and shape parameters respectively. |
pat |
The proportion above the threshold, i.e. Pr[X > log] = pat. |
Let x_i
, i=1,\ldots,n
be the realisation
of a GPD random variable. Thus, the transformation to unit Frechet is
defined as:
z_i = - \frac{1}{\log\left[1 - pat \left(1 + shape \frac{x_i -
loc}{scale}\right)_+^{-1/shape}\right]}
A numeric vector.
Mathieu Ribatet
x <- rgpd(10, 0, 1, 0.25)
z <- gpd2frech(x, 0, 1, 0.25)
z
all(frech2gpd(z, 0, 1, 0.25) == x)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.