# What regression model is the most appropriate to use with count data?

I am trying to get a little into statistics, but I am stuck with something. My data are as follows:

Year   Number_of_genes
1990          1
1991          1
1993          3
1995          4


I now want to build a regression model to be able to predict the number of genes for any given year based on the data. I did it with linear regression until now, but I have done some reading and it does not seem to be the best choice for this kind of data. I have read that Poisson regression might be useful, but I am unsure what to use. So my question is:

Is there a general regression model for this kind of data? If no, what do I have to do to find out which method is the most appropriate to use ( in terms of what I have to find out about the data)?

No, there is no general count data regression model.

(Just as there is no general regression model for continuous data. A linear model with normally distributed homoskedastic noise is most commonly assumed, and fitted using Ordinary Least Squares. However, gamma regression or exponential regression is often used to deal with different error distribution assumptions, or conditional heteroskedasticity models, like ARCH or GARCH in a time series context, to deal with heteroskedastic noise.)

Common models include , as you write, or Negative Binomial Regression. These models are sufficiently widespread to find all kinds of software, tutorials or textbooks. I particularly like Hilbe's Negative Binomial Regression. This earlier question discusses how to choose between different count data models.

If you have "many" zeros in your data, and especially if you suspect that zeros could be driven by a different data-generating process than non-zeros (or that some zeros come from one DGP, and other zeros and non-zeros come from a different DGP), models may be useful. The most common one is zero-inflated Poisson (ZIP) regression.

You could also skim through our previous questions tagged both "regression" and "count-data".

EDIT: @MichaelM raises a good point. This does look like time series of count data. (And the missing data for 1992 and 1994 suggest to me that there should be a zero in each of these years. If so, do include it. Zero is a valid number, and it does carry information.) In light of this, I'd also suggest looking through our previous questions tagged both "time-series" and "count-data".

• Good, but Ordinary Least Squares is an estimation procedure, not a model. You know that, but it's a common confusion, so we shouldn't write indulging it. – Nick Cox Mar 31 '16 at 9:25
• @NickCox: good point. I edited my post. – Stephan Kolassa Mar 31 '16 at 9:27

The "default", the most commonly used and described, distribution of choice for count data is the Poisson distribution. Most often it is illustrated using example of its first practical usage:

A practical application of this distribution was made by Ladislaus Bortkiewicz in 1898 when he was given the task of investigating the number of soldiers in the Prussian army killed accidentally by horse kicks; this experiment introduced the Poisson distribution to the field of reliability engineering.

Poisson distribution is parametrized by rate $\lambda$ per fixed time interval ($\lambda$ is also it's mean and variance). In case of regression, we can use Poisson distribution in generalized linear model with log-linear link function

$$E(Y|X,\beta) = \lambda = \exp\left( \beta_0 + \beta_1 X_1 + \dots + \beta_k X_k \right)$$

that is called Poisson regression, since we can assume that $\lambda$ is a rate of Poisson distribution. Notice however that for log-linear regression you do not have to make such assumption and simply use GLM with log link with non-count data. When interpreting the parameters you need to remember that, because of using log transform, changes in independent variable result in multiplicative changes in the predicted counts.

The problem with using Poisson distribution for the real-life data is that it assumes mean to be equal to the variance. Violation of this assumption is called overdispersion. In such cases you can always use quasi-Poisson model, non-Poisson log-linear model (for large counts Poisson can be approximated by normal distribution), negative binomial regression (closely related to Poisson; see Berk and MacDonald, 2008), or other models, as described by Stephan Kolassa.

For some friendly introduction to Poisson regression you can also check papers by Lavery (2010), or Coxe, West and Aiken (2009).

Lavery, R. (2010). An Animated Guide: An Introduction To Poisson Regression. NESUG paper, sa04.

Coxe, S., West, S.G., & Aiken, L.S. (2009). The analysis of count data: A gentle introduction to Poisson regression and its alternatives. Journal of personality assessment, 91(2), 121-136.

Berk, R., & MacDonald, J. M. (2008). Overdispersion and Poisson regression. Journal of Quantitative Criminology, 24(3), 269-284.

• You conflate fitting a Poisson distribution with using a Poisson regression. It's not an absolute requirement for Poisson regression that the response has a Poisson distribution. Poisson regression works well for a wide variety of positive responses, including measured variables too. It's a good idea to be careful about standard errors for inference, but that's tractable. See e.g. blog.stata.com/2011/08/22/… – Nick Cox Mar 31 '16 at 9:22
• @NickCox right, but the question was strictly about the count data, so there is probably no need to go into details about other usages of Poisson regression. – Tim Mar 31 '16 at 9:29
• No need to go into detail, agreed; but every reason to push Poisson regression a little. Its utility is astonishingly little known; it deserves to be in many more intermediate texts at least. Also, and more important here, I don't agree at all that once variance is not equal to mean you should use other models; this confuses two quite different problems. – Nick Cox Mar 31 '16 at 9:39
• Moreover, the fact that Poisson regression can be used with measured variables is pertinent, as in such cases whether mean equals variance is not even meaningful as they have different dimensions. Such cases thus underline that the requirement is no such thing. – Nick Cox Mar 31 '16 at 10:06
• Part of the problem is terminology. Loglinear regression would in my view be a better term than Poisson regression, given the key point that being Poisson is not central. But if such a term is used and understood at all, it is typically entirely for modelling counted categorical data. So, the terminology is quite the wrong way round: loglinear should be Poisson and Poisson should be loglinear. Either way, the heart of the matter is that $\exp(Xb)$ is an excellent port of first call for the mean structure of non-negative responses in general. – Nick Cox Mar 31 '16 at 10:34

Poisson or negative binomial are two widely used models for count data. I'd opt for the negative binomial as it has better assumptions for variance.

We're looking for long answers that provide some explanation and context. Don't just give a one-line answer; explain why your answer is right, ideally with citations. Answers that don't include explanations may be removed.

• What do you mean by "better"? – Tim Apr 1 '16 at 8:27
• As it stands this is more of a comment than an answer. Do you think you could expand on it? You should certainly think about Tim's comment - the word "better" is very vague – Silverfish Apr 1 '16 at 8:43
• Negative binomial (NB) models deal with overdispersed (OD) count data by assuming it is due to clustering. It then uses a random intercept model with a Poisson distributed 'within' and a gamma distributed 'between' structure. Which is better depends on your assumption for OD. If you assume degree of OD varies with the cluster size, NB may help. If you assume you assume OD is proportional to cluster size, quasi-poisson has this assumption. NB estimates will be biased if OD is just Gaussian noise. Poisson will be less biased, but standard errors may be too small with OD. – Mainard Nov 22 '18 at 8:39