Description Usage Arguments Value Examples
Density, distribution function, quantile function and random generation for the GP distribution with location equal to 'loc', scale equal to 'scale' and shape equal to 'shape'.
1 2 3 4 |
x, q |
vector of quantiles. |
p |
vector of probabilities. |
n |
number of observations. |
loc |
vector of the location parameters. |
scale |
vector of the scale parameters. |
shape |
a numeric of the shape parameter. |
lower.tail |
logical; if TRUE (default), probabilities are Pr[ X <= x], otherwise, Pr[X > x]. |
log |
logical; if TRUE, probabilities p are given as log(p). |
lambda |
a single probability - see the "value" section. |
If 'loc', 'scale' and 'shape' are not specified they assume the default values of '0', '1' and '0', respectively.
The GP distribution function for loc = u, scale = σ and shape = ξ is
G(z) = 1 - [ 1 + ξ ( x - u ) / σ ]^(-1/ξ)
for 1 + ξ (x - u) / σ > 0 and x > u, where σ > 0. If ξ = 0, the distribution is defined by continuity corresponding to the exponential distribution.
By definition, the GP distribution models exceedances above a threshold. In particular, the G function is a suited candidate to model
Pr[ X >= x | X > u ] = 1 - G(x)
for u large enough.
However, it may be usefull to model the "non conditional" quantiles, that is the ones related to Pr[X <= x]. Using the conditional probability definition, one have :
(1 - λ) ( 1 + ξ (x - u) /σ)_+^(-1/ξ)
where λ = Pr[X <= u].
When λ = 0, the "conditional" distribution is equivalent to the "non conditional" distribution.
1 2 3 4 5 6 7 |
[1] 0.9048374
[1] 5.460939 3.804798 2.021735 1.758197 13.020413 2.492344 6.604740
[8] 4.780593 3.198006 1.101556 1.215402 2.364565 1.715765 4.322779
[15] 1.680187 1.785816 3.576727 1.322504 1.326329 1.012779 1.335088
[22] 1.724301 3.186612 2.157817 2.619541 4.608728 2.638383 6.910662
[29] 1.374071 2.441758 2.000738 7.272599 5.404272 1.812853 1.410894
[36] 8.626775 2.175030 1.518199 3.842761 2.084146 2.068750 3.610889
[43] 3.410825 1.638381 4.344764 6.101351 1.942109 3.260409 3.635064
[50] 2.714037 2.544465 3.400972 1.337667 1.019715 1.396572 1.964656
[57] 1.151653 2.663633 5.949055 1.845777 3.030795 4.780536 1.220098
[64] 5.817418 2.196067 3.102135 5.516820 1.274071 3.804003 1.338354
[71] 2.240953 1.719302 6.976219 2.695595 3.499866 1.042804 2.069291
[78] 1.334519 1.240453 4.084253 9.071146 8.074577 1.159836 2.620498
[85] 1.979571 1.989471 2.747446 4.241421 3.379757 1.040490 1.051434
[92] 1.504483 2.228928 1.751674 1.660024 7.188716 2.887518 1.992540
[99] 5.263128 1.645026
[1] 1.052129 1.109119 1.172125 1.242799 1.323624 1.418617 1.534992 1.688051
[9] 1.922607
[1] 0.9999886
[1] 1.000000 1.052129 1.109119 1.172125 1.242799 1.323624 1.418617 1.534992
[9] 1.688051 1.922607
[1] 0.6039532
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.