[R] Generalized Extreme Value Distribution (LMOM package) and Frechet Distribution

Maithili Shiva maithili_shiva at yahoo.com
Thu Mar 19 14:01:28 CET 2009


Dear R helpers

I have some data and through some other software, it is understood that I can fit the Frechet Distribution to it. However, I need to fit the distribution using R code only.

I have searched many R packages and one R helper has suggested some sites too, but unfortunately parameters couldn't be estimated.

Using LMOM package, I know how to estimate the parameters of Generalized extreme value distribution with mu as the location parameter, σ the scale parameter and k as the shape parameter. The sub-families defined by k = 0, k > 0 and k < 0 correspond, respectively, to the Gumbel, Fréchet and Weibull families.

So is it possible to use this property to estimate the parameters of the Frechet distribution.

My data is as given below -

amounts <- c(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0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,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,101.57,102.21,105,105.95,107.07,107.3,110,111.2,112.12,112.53,114.17,115.7,116.02,116.41,116.83,117.06,117.9,118.11,120,121.44,122.8,124.8,125.34,129.92,130..89,131.66,132.84,133.29,133.96,137.3,142.01,151.03,152.48,154.51,156.66,156.97,158.57,161.51,167.69,169.36,170.14,170.72,174.18,175.69,176.12,180,180..02,183.6,193.98,200,200,200,200,200,200,200,200,201.18,203,203.44,207.55,208.32,211.28,214.71,225.65,225.83,226.21,227.65,230,235.28,240.85,247.63,249.13,250,250,255,257.09,260.61,262.63,267.16,270.11,271.16,274.06,280.25,300,300,300,300,300,300,300,300,309.22,309.41,310,314.91,319,320,320.79,324.63,356.87,357,368,373.18,380.15,387.61,392.88,400,400,400,400,400,400,400.18,401.41,401.46,403.28,405.84,412.14,417.93,442,450,454.89,456.97,46
0.52,468.29,500,500,500,500,500,500,500,500,500,500,500,500,500,500,500,500,500,500,500,500,500,500,500,500,500,500,500,500,500,500,500,500,500,501.45,523.9,
525,531.32,540,540,550,560.61,561.36,571.62,600,600,600,600,600,600,600,600,600.15,605.14,610,612.28,621.47,625.03,630.93,639.87,640,650,667.35,668.69,699.68,700,700,700,700,715.11,716.53,717.33,725.04,728.08,730,736.46,743.24,746.73,752.4,752.45,766.37,787.95,788.84,792.92,794.1,797.7,800,800,800.56,800.78,806.64,824.22,828.12,829.76,831.75,834,836.39,837.08,839.56,844.32,886.28,897,900,900,900,900,900,908.81,913.03,924.08,929.78,950,951.67,958.16,982,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1001.19,1001.9,1009.74,1017,1020,1041.99,1044,1046.9,1050,1093.15,1095.61,1096.59,1100,1100,1100,1105.31,1125.01,1126.85,1129.23,1130,1130.1,1138.89,1144.52,1145.22,1150,1152.92,1164.55,1200,1200,1200,1221.41,1226,1230,1235.74,1244,1246.83,1250,1267,1267,1270.98,1300,1307.78,1310,1314.1,1316.44,1322,1332,1334.25,1347.26,1350,1350,1365,1375.95,1382.5,1390.74,1400,1400,1400,1400,1428,1440,1450,1456.3,1465.03,1480,
1485,1500,1500,1500,1500,1500,1500,1500,1500,1500.49,1501.2,1502.13,1565.34,1577.42,1600,1600,1600,1608,1609.95,1611.2,1617.74,1642.74,1650,1667,1667,1667.67,1686.29,1708.71,1716.28,1718,1727.96,1733.34,1736.44,1750,1761.91,1774.33,1786.64,1800,1816.73,1826.65,1842.92,1850,1850,1853.93,1860.7,1882.82,1899.55,1900,1900,1905.77,1941.24,1947.76,1953.09,1979.87,1988.38,1989,1995.35,2000,2000,2000,2000,2000,2000,2000,2000,2008.14,2024.48,2032.44,2047.29,2050,2050,2089,2100,2100,2100,2100,2116,2118.77,2130,2146,2155.72,2173.38,2173.94,2190,2190.26,2200,2200,
2222.12,2240.99,2290,2300,2300,2302.66,2320.38,2325,2325.21,2327.06,2340,2371.42,2399.96,2400,2400,2449.83,2500,2500,2500,2500,2500,2500,2500,2502.18,2505.25,2510,2523,2586.19,2587.5,2596.91,2600,2600,2626.79,2627.81,2638.06,2643,2650,2650,2653.36,2654.55,2699.66,2700,2725.25,2740.96,2746.43,2750,2790,2800,2825,2836.99,2869.32,2871.27,2883.4,2900,2903.86,2975.81,2980,2980,2985.59,2989.93,3000,3000,3000,3000,3000,3002.48,3057,3062,3090.3,3118.39,3165.74,3167.37,3215.39,3245.39,3258.17,3258.9,3264.68,3275.95,3281.6,3300,3300,3353.65,3360,3400,3403.67,3450,3466.26,3498.75,3500,3500,3500,3500.79,3520,3540.3,3561,3563,3592,3601.6,3650,3656.1,3658,3684.59,3698.53,3700,3754..95,3773.12,3784,3800,3814.63,3815.61,3870.2,3924,3927.38,3992.83,4000,4000,4000,4000,4000,4050,4052.74,4063.54,4080.95,4100,4164,4190,4262.85,4290.71,4300,4339.1,4354,4390,4400,4416.24,4426.68,4453.55,4480,4500,4625,4626.65,4671.33,4678.83,4739.74,4762.14,4800,4850,4875.79,4888,4900,4906.52
,4906.52,4954.39,5000,5000,5000,5000,5029.74,5030,5031.4,5059.74,5080,5100,5100,5178.7,5220,5250,5361.34,5400,5400,5453.36,5456.13,5469.94,5500,5584.1,5610,5634.91,5656.78,5656.89,5682.04,5717.7,5750,5800,5800,5814.02,5818,5820,5900,6000,6070.8,6111,6136,6244.62,6288.88,6355.59,6400,6400,6440,6445,6450,6475.6,6500,6500,6550,6603.94,6661.04,6700,6709.52,6726,6964.04,7100,7100.13,7199.83,7200,7257.68,7279.16,7287,7308.23,7310.31,7450.07,7505.69,7546.64,7707.59,7852,7867.97,7900,7970,8000,8169.64,8259,8306,8330,8385.13,8600,8644.54,8700.94,8716.95,8818,8841,8947.2,8975,8979.86,9000,9065.76,9170.85,9226.97,9237.34,9284.72,9297.96,9305.71,9351,
9485,9497,9576,9664.16,9675,9689.7,9753,9847.46,10000,10000,10000,10056,10070,10100,10100,10146.3,10222.95,10233,10233.59,10364,10366.19,10370.71,10428.41,10436.69,10638,10822,10900,10952.18,10993.87,11000,11000,11003.38,11037,11100,11116.5,11199,11200,11400,11484.89,11547.47,11600,11626,11629.2,11702,11777.37,11800,11838,11921.75,12000,12002.84,12050,12110,12140.41,12150,12183.76,12200,12321,12356.33,12378.1,12394,12490,12500,12500.32,12503.86,12810,12832.09,12880,12890,12908.65,12923.56,12990,13093,13139.58,13290.22,13483,13550,13706.82,13924.55,13958.46,14050,14100,14492.18,14554,14740,15000,15121.11,15457.46,15827.73,15975.76,16034,16205.93,16248.34,16318.23,16417.36,16465,16500,16550.75,16552.68,16951.1,17000,17100,17275.57,17332,17398,17555,17827.82,17885,17893.81,17940.18,17994.64,18000,18005,18069,18397.19,18500,18561.9,18574,18743,18936.16,19080,19100,19229,19263,19450,19475,19550,19583,19847.16,20000,20000,20000,20100,20350,20424.14,20450,2049
9.51,20684,20819.21,20900,21289.42,21500,21530,21628.38,21850,22260,22457.95,22546.07,23625,23877.68,24375.77,25100,25150,25761.56,25786.71,25933.09,26080,26160,26200,26340.73,26522.27,26700,26786.99,26818.54,26990,27121.17,27200,27611,27871.98,28667,28673.9,29058.04,29465,29552,30046.35,30377.5,31214.16,32571,32822.68,33780.05,33928,34400,34914,36884.17,37953.17,38508,38726.88,39612.48,40410,40968.56,41000,41168.6,41533.94,41921,42115.41,42295.49,42925.37,44650,45000,46527,46677.8,46800,46993.69,47308,48762.57,48775.83,50000,50000,50100,50700,51741.94,52342.84,53173.2,53940,54482.18,55008.81,55460.09,57115.03,59606.49,59928.59,60000,60160.95,61052,61329,63505.07,73796.05,73847,75000,76688,77926.55,81147,82463,84872.23,85857.17,87400,89189.35,94637.19,96161.74,97230.55,97624.43,98911.38,100000,103825.98,109872.87,112453.28,115528.31,115777,118110,119341.43,123902.53,124358,
134173,138067,138905,139072.48,139361.86,140270,141550,144311.66,151869,151869,156888,159649,160129.83,161859.97,170420,177000,177513.55,177614.19,182279.03,186500,188474,197044.03,200000,200741.43,200768.55,203371,203383.5,204200,204400,207879,212415.51,214816,215781.28,222019.19,229183.22,231505,233549.36,235607.56,239257.68,239925,245258.43,248499.2,259278.95,261922.97,272284.9,275000,283205,291264,293481.66,303210,310373.67,311087.95,319646.4,328681.27,331306,338307.4,348976.92,351130.53,363343.62,374805.3,375652.22,429992.87,431480.23,445515.79,467627.37,471541.64,487486.43,493904.08,500000,502300,503875,507375.59,507539.6,526842.69,527361.51,547194.24,557345.18,565977.19,589726.02,629391.01,641285.67,672182.15,677390.49,734816.68,760369.52,771045.36,774099.69,802573.7,907223.54,935648.68,937675,979470.35,1066510.66,1162361.91,1183430.13,1233853.07,1326489.12,1900678.25,2478632.75,3079877.63,4934167.89,7122756.78)


Extremely sorry for such a huge data. The data has lots of zeros but I need to retain them as they are and try to fit the distribution.


Thanking you all in advance,

With regards

Maithili

  
 
 







More information about the R-help mailing list