# GUMBEL: Two parameter Gumbel distribution and L-moments In nsRFA: Non-Supervised Regional Frequency Analysis

## Description

`GUMBEL` provides the link between L-moments of a sample and the two parameter Gumbel distribution.

## Usage

 ```1 2 3 4 5 6``` ```f.gumb (x, xi, alfa) F.gumb (x, xi, alfa) invF.gumb (F, xi, alfa) Lmom.gumb (xi, alfa) par.gumb (lambda1, lambda2) rand.gumb (numerosita, xi, alfa) ```

## Arguments

 `x` vector of quantiles `xi` vector of gumb location parameters `alfa` vector of gumb scale parameters `F` vector of probabilities `lambda1` vector of sample means `lambda2` vector of L-variances `numerosita` numeric value indicating the length of the vector to be generated

## Details

See http://en.wikipedia.org/wiki/Fisher-Tippett_distribution for an introduction to the Gumbel distribution.

Definition

Parameters (2): ξ (location), α (scale).

Range of x: -∞ < x < ∞.

Probability density function:

f(x) = α^{-1} \exp[-(x-ξ)/α] \exp\{- \exp[-(x-ξ)/α]\}

Cumulative distribution function:

F(x) = \exp[-\exp(-(x-ξ)/α)]

Quantile function: x(F) = ξ - α \log(-\log F).

L-moments

λ_1 = ξ + α γ

λ_2 = α \log 2

τ_3 = 0.1699 = \log(9/8)/ \log 2

τ_4 = 0.1504 = (16 \log 2 - 10 \log 3)/ \log 2

Here γ is Euler's constant, 0.5772...

Parameters

α=λ_2 / \log 2

ξ = λ_1 - γ α

`Lmom.gumb` and `par.gumb` accept input as vectors of equal length. In `f.gumb`, `F.gumb`, `invF.gumb` and `rand.gumb` parameters (`xi`, `alfa`) must be atomic.

## Value

`f.gumb` gives the density f, `F.gumb` gives the distribution function F, `invF.gumb` gives the quantile function x, `Lmom.gumb` gives the L-moments (λ_1, λ_2, τ_3, τ_4)), `par.gumb` gives the parameters (`xi`, `alfa`), and `rand.gumb` generates random deviates.

## Note

For information on the package and the Author, and for all the references, see `nsRFA`.

`rnorm`, `runif`, `EXP`, `GENLOGIS`, `GENPAR`, `GEV`, `KAPPA`, `LOGNORM`, `P3`; `DISTPLOTS`, `GOFmontecarlo`, `Lmoments`.

## Examples

 ``` 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19``` ```data(hydroSIMN) annualflows[1:10,] summary(annualflows) x <- annualflows["dato"][,] fac <- factor(annualflows["cod"][,]) split(x,fac) camp <- split(x,fac)\$"45" ll <- Lmoments(camp) parameters <- par.gumb(ll[1],ll[2]) f.gumb(1800,parameters\$xi,parameters\$alfa) F.gumb(1800,parameters\$xi,parameters\$alfa) invF.gumb(0.7686843,parameters\$xi,parameters\$alfa) Lmom.gumb(parameters\$xi,parameters\$alfa) rand.gumb(100,parameters\$xi,parameters\$alfa) Rll <- regionalLmoments(x,fac); Rll parameters <- par.gumb(Rll[1],Rll[2]) Lmom.gumb(parameters\$xi,parameters\$alfa) ```

### Example output

```   cod anno dato
1    1 1956 1494
2    1 1957 1309
3    1 1958 1699
4    1 1959 1467
5    1 1960 1918
6    1 1961 1469
7    1 1962 1267
8    1 1963 1523
9    1 1964 1338
10   1 1965 1438
cod            anno           dato
Min.   : 1.0   Min.   :1921   Min.   : 172.0
1st Qu.:13.0   1st Qu.:1940   1st Qu.: 725.2
Median :22.0   Median :1951   Median : 981.0
Mean   :23.7   Mean   :1951   Mean   :1041.4
3rd Qu.:34.0   3rd Qu.:1960   3rd Qu.:1308.8
Max.   :49.0   Max.   :1985   Max.   :3045.0
\$`1`
[1] 1494 1309 1699 1467 1918 1469 1267 1523 1338 1438 1788 1591 1697 1780 1769

\$`2`
[1] 1144 1652 1807 1881 1741 1124 2064 1434 1678 1239  921  983 1093 1744 1213
[16] 1590  956 1124 2181 1077 1345 1219  988 1325 1277 1479 1307 2053 1232  973
[31] 1407  912

\$`3`
[1] 2596  954 1115 1248  867 1280 1588 1055 1764 3045

\$`4`
[1]  871 1238 1505 1636 1553 1936 1739 1867 1184 1630 1311 1520 1201 1614 1971
[16] 1829 1781 1093 1996 1328 1662 1199  860  961  949 1536 1016 1386  820 1023
[31] 2329 1209 1305 1334 1024 1364 1310 1410 1247 2393 1317  909 1808 1020 1181
[46] 1365 1218 1644 1160 1002 1243 1332 1033 1170 1685 1478 2434 1600 1369 1215
[61] 1614 1449 1518 1490 1191

\$`7`
[1] 1481 1758 1774 1625 1607 2826 1488  928 2379 1173 1801 1824 1309 2220 1733

\$`8`
[1] 1086 1810 2244 2138 2028 1308 1947 1528 2244 1594  861 1378 1795 1344 1558
[16]  696  724 2497  660 1388 1484  952 1987 2646 1689 1443 2688 1249 1145 2392
[31] 1001 1380

\$`9`
[1] 2075 1607 1717 1261 1824 1330  963 1313 2276  682 1440 1304 1193

\$`10`
[1] 1096 1387 1289 1461 1054 1474 1137 1256  981 1696 1468 1850 1644 1248 1498
[16] 1317 1500 1109  859  931 1020 1493  954 1133 1144 1056

\$`11`
[1] 1320 1706  948 1643  944 1402 1202 1788 1665 1833 1679 1166 1833 1661 1938
[16] 1457  830 1221 1398 1674 1311 1611 1003 1021

\$`12`
[1]  890 1247 1040 1047  875 1060  913  968  749 1218 1104 1489 1300  833  994
[16] 1002 1134  854  826  695  939 1230  830 1096  876  704 1111  780  791  709
[31]  812  686  812  755  802 1098  868  735  829  750  635  887  711  753  935
[46]  862  830  924  735  766  930  783 1623 1359 1015  922  963  848  975  760
[61]  766

\$`13`
[1] 1288  854 1324  741 1043  756 1477 1160 1426 1360 1109 1211 1094 1666 1002
[16]  772 1124  997  649 1436  762 1293  930  721  838 1063  710 1002 1625 1002
[31]  848 1104  869  823  992  588  894 1073  675 1181 1568  817 1068  978

\$`14`
[1] 1505  928 1223  805 1449 1084 1588 1509 1137 1014 1181 1394  922  811 1428
[16] 1137 1240 1034  581 1501  700 1263  962  780  919 1068  855 1198 1569 1134
[31] 1007 1205  973  871 1188  581 1027 1192  578  875 1553  774  958 1187 2152
[46]  836  834  753 1110

\$`15`
[1]  969  811 1107  769  567  925  508  598  818  495

\$`16`
[1]  957  625  625  658 1022  555  496  625  593 1115  718  957  707  332  821
[16]  469  913  663  418  523  799  469 1000 1104  761  598 1033  707  469  614
[31]  270  609 1017  367

\$`17`
[1]  595  718  518  548  389  567  506  985  530 1097  934  675  614  587  722
[16]  499  459 1087  550  860  648  296  658

\$`18`
[1]  686  863  488  937  453  621  484  851  599 1161  894  598  645  606  772
[16]  449  486  510  559  829  545  898  529  392  856  625  773  651  674  432

\$`19`
[1]  589  715  479  696  394  533  430  845  519 1012  805  559  569  580  725
[16]  448  412  411  407  638  506  729  538  350  736  513  787

\$`20`
[1] 1237 1908 1263 1066 1401 1263 1134  799  919  971 1057 1710 1555 1667 1212
[16]  799 1366  962 1779 1504  808 1031 1186 1031 1796 1882 1487  945 1710 1194
[31]  919 1418  722 1160 1409  894 1279 1884 1307

\$`21`
[1] 489 704 310 665 259 501 428 820 551 994 658 425 423 409 736 440 401 398 342
[20] 658 449 665 535 247 584 338 580 569 311 412 565 403 846 917 525 411 717 526
[39] 248 451 185 356 564 256

\$`22`
[1] 1197  863 1382 1104  649  745  615 1116  618  739  761  720 1147  838 1057
[16]  739  529  962  470  881  495  417  553  819  711 1410 1472  727  671 1163
[31]  751  476  819  399  612  860  507  844 1245  953  976

\$`23`
[1]  835 1345 1085 1655 1291  838  974  862 1106  699  854  721  699 1033  892
[16] 1213  631  554  833  911  796  721  727

\$`24`
[1] 1795 1761 1962 1541 1007 1276 1144 1302  947 1210 1113 1532  764  849 1412
[16] 1105 1048  843 1048 1157

\$`25`
[1] 1498  880 1028 1046  589 1088 1179 1471  761 1106 2017  649 1129 1149 1355
[16] 1107

\$`26`
[1] 1634 1300 1715 1643 1295 1459 1020 1531  919 1095  876  857 1534 1183 1405
[16] 1051 1159 1478 1472 1364 1140 1126 1007

\$`27`
[1] 1157 1759 1245  842 1056  800 1244  806  925  839  782 1236 1601  886  768
[16] 1109  722  440

\$`28`
[1] 1121 1488 1158 1287 1210 1468 1445 1304 1967 1408

\$`29`
[1] 1121 1482 1163 1378 1201 1677 1360 2230 1117 1093 1647 1358

\$`30`
[1]  395  342  463  649  400  703  388  570  292  490  440  885  671 1035  729
[16]  360  467  351  765  418  455  339  311  493  432  686  353  337  449  513
[31]  374  475  628  496  844  974  375  419  651  441  226  438  218  461  504
[46]  309  543  870  433  724  604  712  865  395  324  436  607  399

\$`31`
[1]  754 1025  829 1428 1828 1472  771 1144  980 1728  720  850  995  901 1138
[16]  678  805 1509  616  629  716  848  767  720 1426 1370 1826 1046 1172  869
[31]  793 1008  571 1161

\$`32`
[1]  920 1674 1153 1512 1226  647  945  822 1665  632  746  705  759  932  617
[16]  632 1259  506  590  743  598  747  988  855 1229 1461  458  804  867  652
[31]  580

\$`33`
[1]  684  701  486  792  727 1086  564  624 1205  463  846  894  707  733  892
[16]  869 1283 1444  474  798  935  719  445  749  428  772  854  545 1002  939
[31]  643  603  785  775 1025  584

\$`34`
[1]  636  998 1014 1965 1333 1730 1330  825 1112  851 1423  960 1031  976  561
[16] 1055 1076 1224  658  707 1453  445  966  930  939  862 1115 1158 1573

\$`35`
[1]  845  803  746 1036 1160 1038 1285  369 1093  732  613  620  863  579  765
[16]  819  505  594  667  651  950 1583  688  622 1068

\$`36`
[1]  924 1676 1765  841  796  745 1363  663  714  382  771  796  956 1153  669
[16]  796 1879  643  796  994  733 1185

\$`37`
[1]  597  833  902 1207  793  598 1328  323  561  726  663  919 1139 1040 1264
[16] 1214

\$`38`
[1]  492  608  368  393 1123  172  281  539  424  585  632  528

\$`39`
[1]  339  929  560  727  490  684  979 1466  404  865  533  462  287  767  653
[16] 1176 1906  883

\$`40`
[1]  755.00  871.00  938.00 1175.00 1218.00  621.00  432.25  913.20  840.15
[10]  827.97  919.29  724.48  602.72

\$`41`
[1] 1449 1449 1546 1516 1254 1382

\$`42`
[1]  895 1006 1351 1215 1215 1279 1006 1156  821

\$`43`
[1]  948 1308 1185  801  848  926  932  755  764  891  677  835 1112  918  742
[16]  685  927

\$`44`
[1] 1607 1275 1613 1484 1487 1205 1367 1158 1583 1342 1848 1640 1225 1320 1202
[16] 1476 1190 1435  894 1326 1230 1042 1127

\$`45`
[1] 1953 1939 1677 1692 2051 2371 2022 1521 1448 1825 1363 1760 1672 1603 1244
[16] 1521 1783 1560 1357 1673 1625 1425 1688 1577 1736 1640 1584 1293 1277 1742
[31] 1491

\$`46`
[1] 1223 1077  671 1063  969  842 1037  903 1407 1153 1107 1293  813  834 1118
[16]  901  981

\$`47`
[1]  986  996 1335  964 1018  821  945  844 1133  975 1082 1252 1031  940 1078
[16]  933  709  923  899  747 1010  873  962  965  674  763  915 1029 1452 1486

\$`48`
[1]  872 1528 1062 1345 1158  998 1197 1234 1469 1343 2103 1745 1084 1717 1131
[16]  990 1186  884 1118 1383  877 1072 1906  830

\$`49`
[1]  808 1088 1435 1265 1065  911  992 1273 1031 1100  769  865  781 1019 1761

l2
0.001013982
l1
0.7686843
l1
1800
\$lambda1
l1
1648.806

\$lambda2
l2
138.2366

\$tau3
[1] 0.169925

\$tau4
[1] 0.150375

[1] 1903.708 1428.466 1285.814 1838.794 1665.145 2076.468 1566.537 1429.013
[9] 1692.607 1680.064 1684.374 1640.741 1397.152 1574.904 1776.577 1376.031
[17] 1974.668 1395.482 1960.947 1841.113 1603.785 1569.229 1648.876 1748.820
[25] 1796.972 1611.675 1476.852 1438.388 1768.885 1576.190 1449.831 1454.273
[33] 1595.974 1563.343 1388.448 1691.372 1761.212 1645.744 1466.284 1910.041
[41] 1568.843 1409.652 1895.027 1540.044 1612.490 1636.033 2084.872 1227.158
[49] 1338.268 1485.079 1279.252 1506.150 1678.622 1427.825 1566.434 2026.936
[57] 1772.937 1485.905 1621.129 1396.367 1442.355 1464.600 1590.519 1717.804
[65] 1573.774 1465.997 2320.100 1605.166 1530.286 1429.199 1547.450 1245.505
[73] 1419.271 1691.497 1602.634 1494.855 1497.171 1582.278 1503.432 1385.969
[81] 1547.634 1762.102 1745.194 1469.328 1957.102 1580.540 2322.846 1327.557
[89] 2400.977 1717.974 1801.186 1524.829 1549.947 1766.201 1826.389 1644.157
[97] 1601.854 1319.043 1339.373 1766.457
l1R          l2R         lcvR         lcaR        lkurR
1041.4321277  160.1783511    0.1597701    0.1489629    0.1356834
\$lambda1
l1R
1041.432

\$lambda2
l2R
160.1784

\$tau3
[1] 0.169925

\$tau4
[1] 0.150375
```

nsRFA documentation built on Feb. 26, 2020, 5:19 p.m.