0
$\begingroup$

I'm trying to fit an appropriate distribution to a data with 216 values and estimate parameters. From Cullen and Frey graph, it looks like lognormal could be a good fit. From q-q plot, Weibull seems to be way off(not shown here), gamma and lognormal both have a decent fit. However, from the plots, I noticed that values near the tails for gamma and lognormal deviate from theoretical quantiles. Per KS goodness of fit test, both gamma and lognormal should be rejected. Can anyone help me find the best distribution to fit this data? Maybe generalized gamma or some other distribution?
I also noticed that when using fitdist() function for gamma and lognormal, I get warning messages saying "produced NaNs". I know this has something to do with starting values. Is it a huge concern as I still get results? There is no reason to believe that this data necessarily comes from a parametric distribution but it'd help me a great deal for my application even if it's an approximate fit. Cullen and Frey Gamma Fit Lognormal fit

data:

sample_dat <- c(`1` = 24190.6519978227, `2` = 17577.6779580857, `3` = 17783.6137418753, 
`4` = 18502.2588058986, `5` = 20987.7098031672, `6` = 19082.1828830684, 
`7` = 19867.7051305278, `8` = 19805.6604578152, `9` = 21073.7410563297, 
`10` = 20235.1985438263, `11` = 20280.7721982665, `12` = 20618.4731913037, 
`13` = 20015.0345952459, `14` = 20178.8937222835, `15` = 21165.010526476, 
`16` = 19869.912957752, `17` = 19936.3647075856, `18` = 19732.6497421531, 
`19` = 19769.7478650236, `20` = 20275.7268959984, `21` = 19728.5633481974, 
`22` = 19550.0486566074, `23` = 19986.08929126, `24` = 19518.044670615, 
`25` = 19880.6560083398, `26` = 20038.4361737349, `27` = 19727.7660781244, 
`28` = 20575.5693632931, `29` = 19893.3495137753, `30` = 19819.6912196116, 
`31` = 20037.9126248003, `32` = 19762.9865189421, `33` = 20163.420948739, 
`34` = 20655.8319892201, `35` = 20157.5385415838, `36` = 20494.4752591327, 
`37` = 20342.3076327613, `38` = 19921.9235301919, `39` = 20168.4958393548, 
`40` = 19767.7258943828, `41` = 19980.6964110633, `42` = 19906.6818024689, 
`43` = 19769.8473448909, `44` = 20026.813630786, `45` = 19777.3262456911, 
`46` = 19492.905169283, `47` = 19959.1501418138, `48` = 19670.974502509, 
`49` = 19796.871772798, `50` = 20639.4272084155, `51` = 20279.0230729833, 
`52` = 20250.3425534929, `53` = 19817.1066831987, `54` = 19346.2985293944, 
`55` = 20015.3672895762, `56` = 19581.2802602078, `57` = 19507.1241669358, 
`58` = 19838.9956176621, `59` = 19371.4990351715, `60` = 19656.6360612319, 
`61` = 20173.4070999522, `62` = 19604.065377713, `63` = 20229.0647995393, 
`64` = 19395.0701456043, `65` = 19235.7844177276, `66` = 20408.4168183013, 
`67` = 20212.0917841551, `68` = 19940.5398807866, `69` = 20069.1312811576, 
`70` = 19388.361897448, `71` = 20218.6934536489, `72` = 20288.8044431891, 
`73` = 20175.4766982743, `74` = 21102.8588369018, `75` = 20367.3406272503, 
`76` = 20197.9482860951, `77` = 20605.3123087575, `78` = 23190.1151473022, 
`79` = 20421.8632368977, `80` = 19838.9569703404, `81` = 19903.3910024236, 
`82` = 20529.2543352289, `83` = 24423.8018209449, `84` = 19789.4554741556, 
`85` = 20409.2450942893, `86` = 19187.6856447278, `87` = 19854.0293926443, 
`88` = 19820.6523140919, `89` = 19647.3078820941, `90` = 19856.0398360484, 
`91` = 18668.2689169183, `92` = 18806.1743770072, `93` = 19316.0908116071, 
`94` = 19201.275058431, `95` = 19934.6394421779, `96` = 19320.3075192736, 
`97` = 18532.5267692405, `98` = 19400.0720216917, `99` = 21950.2266577088, 
`100` = 18570.1177147663, `101` = 18936.2431216396, `102` = 18192.0699954351, 
`103` = 19097.0451612151, `104` = 19359.9731844248, `105` = 18836.556092507, 
`106` = 19735.0745856312, `107` = 19722.3443123634, `108` = 19173.0339230909, 
`109` = 20365.6006661866, `110` = 20123.9044385451, `111` = 19825.54937388, 
`112` = 19885.0111644767, `113` = 19414.0353346761, `114` = 20210.774891742, 
`115` = 20660.8666708364, `116` = 20596.7855769297, `117` = 20663.6530884631, 
`118` = 20196.0492755493, `119` = 20226.1463575532, `120` = 20700.2336558365, 
`121` = 20287.0968525683, `122` = 21250.5489155952, `123` = 21268.4163649977, 
`124` = 21246.6291697841, `125` = 24939.3311103555, `126` = 20597.7926248392, 
`127` = 20490.695199506, `128` = 20756.9106472625, `129` = 20006.7323761338, 
`130` = 20185.2391558478, `131` = 20496.0140834608, `132` = 19893.8369321575, 
`133` = 20142.9907377186, `134` = 19569.9811926461, `135` = 18962.784022162, 
`136` = 19537.9950479324, `137` = 19530.6810590182, `138` = 19673.8046574291, 
`139` = 20381.2464924931, `140` = 19161.8961947673, `141` = 19399.6581385452, 
`142` = 19628.3405896661, `143` = 19328.3622864074, `144` = 19485.182297409, 
`145` = 18996.538950381, `146` = 18585.1310826446, `147` = 18743.3310031845, 
`148` = 19093.3003591165, `149` = 19133.6434814352, `150` = 19133.1047974024, 
`151` = 19094.0654002703, `152` = 19245.7200898926, `153` = 19663.5836236574, 
`154` = 20065.1241427255, `155` = 20245.0576735299, `156` = 20133.2636199266, 
`157` = 20316.8734153867, `158` = 20600.7727873761, `159` = 21675.8632677, 
`160` = 22756.7527085958, `161` = 20876.9359622793, `162` = 20053.3238209932, 
`163` = 20233.9246955674, `164` = 20038.3857493922, `165` = 20095.1027652358, 
`166` = 20129.8451905491, `167` = 20362.1187876726, `168` = 20167.0602340497, 
`169` = 19577.0523241914, `170` = 19544.2179732263, `171` = 19743.3815680761, 
`172` = 19469.9349326817, `173` = 19744.759325937, `174` = 20133.4187073207, 
`175` = 20076.4050336208, `176` = 19686.557716286, `177` = 19851.9233283836, 
`178` = 19499.7859626472, `179` = 19767.7692779779, `180` = 20236.7830376002, 
`181` = 19916.5202836501, `182` = 19852.2658957894, `183` = 22708.7299098016, 
`184` = 19535.2342988054, `185` = 19881.1852072082, `186` = 21978.69950247, 
`187` = 19719.4917230461, `188` = 19845.0343713612, `189` = 19483.6957534967, 
`190` = 19710.6439591109, `191` = 19475.1964533578, `192` = 19487.602916967, 
`193` = 19961.0092562518, `194` = 21665.1446008963, `195` = 19469.3228093585, 
`196` = 19595.5475973323, `197` = 19822.4656998112, `198` = 19638.9709378275, 
`199` = 19808.01019673, `200` = 19164.8759623877, `201` = 19424.6565379976, 
`202` = 19538.3303853448, `203` = 19253.1915738142, `204` = 19805.8673118959, 
`205` = 19778.0830250914, `206` = 19961.3991008866, `207` = 20514.8743721598, 
`208` = 20744.9688513231, `209` = 20364.2239731278, `210` = 21234.1232167435, 
`211` = 20251.8204798059, `212` = 20432.7852139617, `213` = 20233.9181878248, 
`214` = 20340.3176742371, `215` = 19693.2478441763, `216` = 18786.5621200915
)
$\endgroup$

1 Answer 1

0
$\begingroup$

Have you seen the poweRlaw package? They have a bootstrap estimation of the p-value for lognormal fit to the data.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.