1
$\begingroup$

I'd like to find best distribution to my data set below, and I have used (fitdistrplus) package but I do not know which distribution is fitted my data because my data set contains zeros. I used the commands below in R, but it does not work for most distributions, including the normal distribution.

Can anyone help me?

## Best fitted distribution

require(fitdistrplus)
require(logspline)

descdist(MR1, discrete=FALSE)

fit.norm <- fitdist(MR1, "normal")
plot(fit.norm)

My dataset:

(27 3.5 8.1 4.2 0.6 0 0 0 0 18.9 62.2 23.1 2.6 17 8.7 23.8 0.3 0 0 0 0 0 6.2 5.5 40 14.3 25.1 4.7 3.2 0 0 0 0 0 0.8 3.2 12.8 0.7 10.9 4.1 0.6 0 0 0 0 33 53.9 26.9 32.5 18.4 32.9 0 0 0 0 0 0 0 0 0 19.2 7.8 3.7 0 0 0 0 0 0 0 6 12.1 10 7 0.3 4.2 0 0 0 0 0 10.8 59.7 10 12.1 6.6 7 25.7 6 0 0 0 0 4 7.6 11.7 5 0.4 9.3 16 4 0 0 0 0 0.4 5.3 12.4 0 0 0.403 7.185 7.179 0 0 0 0 0.002 25.302 20.4 24.802 1.201 1.002 4.402 7.202 0 0 0 0 0.002 11.1 1.703 27.705 9.702 12.804 12.402 0.203 0 0 0 0 0.001 6.601 2.003 25.505 43.304 0.001 36.605 11.303 0 0 0 0 2.814 27.101 44.1 12.403 2.405 0.006 8.302 0.004 0 0 0 0 0.002 0.001 12.803 19.606 1.001 0.502 0.203 2.006 0 0 0 0 28.801 0.502 19.801 0.002 5.802 19.502 16.8 0.205 0 0 0 0 7.403 5.105 9.502 2.703 14.802 5.903 13.402 8.601 0 0 0 0 0 0 4.902 21.803 19.8 4.802 21.904 1.6 0 0 0 0 0.301 0.001 1.101 0.204 3.901 2.802 0.201 1.7 0 0 0 0 2.403 15.701 21.902 27.602 3.201 0.001 0.005 20.001 0 0 0 0 1.901 103.302 0.104 37.701 2.603 26.304 12.604 0.002 0 0 0 0 2.902 16.003 6.465)

$\endgroup$
  • $\begingroup$ This isn't clear. Why do you need to identify the distribution of these data anyway? $\endgroup$ – gung Aug 5 '15 at 0:43
  • 2
    $\begingroup$ With a mix of discrete (the spike at 0) and (apparently) continuous, the usual laundry list of distributions would be useless. If you do come up with a plausible distribution with some few parameters, it will certainly be wrong (i.e. merely an approximation of the distribution) Why would you need to identify a distribution? (Actually, this problem looks slightly familiar -- is this an exercise for some class?) Can you say more about what is being measured here? $\endgroup$ – Glen_b Aug 5 '15 at 1:04
  • 1
    $\begingroup$ Thanks for your answer the measured data is rainfall and the purpose of distribution is part of time series analysis of rain data for hydrological studies $\endgroup$ – Salam Abbas Aug 5 '15 at 1:49
  • 1
    $\begingroup$ Thanks for the information; it really should be in your question. I've added some information to my answer. $\endgroup$ – Glen_b Aug 5 '15 at 1:54
  • $\begingroup$ Thanks for your valuable comment the data is monthly rainfall from January 1994 to December 2014 $\endgroup$ – Salam Abbas Aug 5 '15 at 2:04
1
$\begingroup$

Taking the question at face value (i.e. leaving aside whether it's necessary or even advisable*), just looking at the numbers without knowing what they are (which is were a model should start -- from an understanding of the thing being measured) there are obviously zeroes in the data but the rest of it seems positive and continuous.

* throwing a laundry list of distributions at a problem without accounting for the overfitting (etc) that this approach leads to would be inviting a host of problems.

An obvious place to start would be a mix of a spike at 0 and a positive continuous distribution, of which there are very large numbers. If we just try one (my first thought was a gamma, for no especially good reason since I'm operating in ignorance of what we're measuring here), fitting a gamma to the non-zero part seems to give a perfectly plausible approximation to the distribution:

enter image description here

In response to the additional information relating to rainfall -- this would be a mixture of different distributions. If we have 252 days of rainfall, that covers several seasons, and one part of the year would be expected to have different rainfall patterns than others. As such - even if rainfall patterns were stable from year to year - this marginal distribution would depend on which 252 days were included and so still wouldn't be useful in telling us about the rainfall overall, nor in any particular part of the year (like a given month).

I have seen lognormal distributions used for the conditional distribution of rainfall (e.g. given there was some rain, and given the time of year, and given whether or not there was rain on the previous day); that might well be adequate to model your data. Alternatively a conditional gamma or Weibull might work well enough in the same circumstances.

However, I fail to see how just smooshing the conditional distributions all together is likely to be useful at all.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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