I am trying to fit a regression model where the dependent variable is number of messages received (MsgReceived in sample data below) by an individual/user, and the independent variables are a mix of count and binary variables like "TimeActive", "BioAvailable" etc.

Here, TimeActive is a count of weeks the user was active and BioAvailable is a 1-0 identifier stating whether the user has filled out his Bio

Here's some example data:



I am wondering if fitting a generalized linear model using a Poisson distribution is still the best fit even though the count of messages is over the life of a user's activity and not just a session. Assuming that a user's lifetime is a period seems fair. Is this correct? If not, what distribution and regression method would be a better fit?

  • $\begingroup$ I've removed the tag "logistic", which seems quite irrelevant here. If I missed the point, please edit the posting to explain otherwise. (The use of a binary predictor is immaterial.) $\endgroup$ – Nick Cox Nov 28 '13 at 14:33

Another option is to fit quasiPoisson models with log link & dispersion parameter $\phi$. As for the Poisson GLM with log link, the expectation of the response is $\operatorname{E}(Y) =\mu$, where $\mu=\exp(\beta^\mathrm{T} x_)$, but its variance is $\operatorname{Var}(Y)=\phi\mu$. This doesn't affect the point estimates of the coefficients, but does their standard errors, & hence confidence intervals.

Another is to fit a Poisson GLM but use a robust estimate of the coefficients' variance–covariance matrix to calculate their standard errors, as @Nick suggests. Again, this doesn't affect the point estimates of the coefficients. Note that the assumption $\operatorname{Var}(Y)\propto\mu$ is still made during Fisher scoring: though estimates are consistent even if that's not true, they'll be closer on average for a given sample size if it is (this point was skated over rather in the otherwise very good article on the Stata blog). If the variance–mean relationship is clearly different you could use other GLMs with this estimating-equation approach; in practice, with count data, it tends to be hard to be sure of much more than that it's increasing.


It doesn't depend on whether the count is over a session or a lifetime. It depends on whether the assumptions of Poisson regression are met or not.

The one that usually causes problems is that, in Poisson regression, it is assumed that the conditional mean of the dependent variable equals the conditional variance. I have rarely found this to be the case, but it sometimes happens.

Usual generalizations of Poisson regression are negative binomial regression and zero-inflated versions of both.

  • $\begingroup$ That assumption is secondary for Poisson regression. See blog.stata.com/tag/poisson-regression There is no need to fall back on more complicated models if the main idea of $y = \exp(Xb)$ is a good approximation. $\endgroup$ – Nick Cox Nov 28 '13 at 14:15
  • $\begingroup$ @NickCox Well, the conclusions there were 1) to use vce(robust) which is Stata-specific and 2) that nbreg was robust to violations of assumptions. $\endgroup$ – Peter Flom Nov 28 '13 at 14:23
  • $\begingroup$ Not sure of your first point: if it's that Stata offers a solution not matched by all other software, that isn't Stata's fault. I'd prefer Poisson regression to negative binomial regression if both worked equally well. More crucially, my main point is that the variance-mean proportionality is often invoked as more important than it really is in practice, just as an assumption of Gaussian error terms are often invoked as more important than it is for classical regression. $\endgroup$ – Nick Cox Nov 28 '13 at 14:31
  • $\begingroup$ My first point was that the solution offered wouldn't generalize; I wasn't criticizing Stata (about which I know little). $\endgroup$ – Peter Flom Nov 28 '13 at 14:37
  • $\begingroup$ Wouldn't generalize in what sense?. For "proportionality" in my previous comment please read "equality". $\endgroup$ – Nick Cox Nov 28 '13 at 14:46

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.