I am interested to fit distribution to the count data presented as histogram below:

Histogram of count data

Is there a way to understand what is the most likely distribution of the data without apriori hypothesizing the distribution?

Following, let's say I suspect the data to be distributed according to zero-inflated Poisson distribution. If I don't have any explanatory variables, is the right way to model it would be:

fm_zip <- zeroinfl(span$lifespan ~1, data = counts)


After fitting negaitve binomial zero-inflated model (lifespan ~1, ) the following model is reached (visualized with rootograms; countreg package): enter image description here

There seems to be a systematic overestimation in the first part of the histogram (x<20), and underestimation in the second part.

  • Is there a way to improve the fit without adding new explanatory variable?

  • Does it make sense to add dummy variable that indicates whether X>20 as explanatory variable?

  • $\begingroup$ What are your estimates for the mean and variance (assuming zero-inflated poisson)? $\endgroup$
    – ilanman
    Dec 31, 2016 at 12:35
  • $\begingroup$ Your approach seems a good starting point. I might be a bit worried about the slight piling up at higher counts. If you get a poor fit try the negative binomial of which Poisson is a special case. The vignette for pscl is a mine of useful information. $\endgroup$
    – mdewey
    Dec 31, 2016 at 13:34
  • 1
    $\begingroup$ "The most likely distribution" is the one that assigns probability $k/n$ to the number $x$ when $x$ has appeared $k$ times in a dataset of $n$ values. In other words, it's exactly the empirical distribution of the data. This illustrates a classic trade-off: if you're willing to assume little or nothing about the data-generation process, then what you can infer from the data is equally limited. $\endgroup$
    – whuber
    Dec 31, 2016 at 15:26
  • $\begingroup$ @ilanman the mean is 6.31 and standard deviation is 11.39. Thanks! $\endgroup$
    – Michael
    Jan 1, 2017 at 7:45


Your Answer

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

Browse other questions tagged or ask your own question.