I study the behavior of municipal authorities towards their neighbors. The theory is that some properties of municipalities (like a level of indebtedness) make them more 'aggressive'. I have a database of the statements each municipality made per year, and the number of those categorized as negative (like threat to file a lawsuit). The dataset looks something like that: dataset_depiction The problem is that there are huge municipalities (with several millions of inhabitants, like Municipality A in example), and tiny municipalities like B above, with different capacities to produce statements. In addition one important property is that overwhelming majority of statements are neutral or positive (like sign a cooperation agreement), so negative statements usually account for a small fraction, no more than 5% of all statements.

What is the correct way of analyzing such type of data to account for variability across different items?

I could just look at the relative share of 'negative' statements in all statements made, but that would not work for small municipalities because they have a huge variation. Perhaps the correct way of doing it is using count data models such as Poisson regression, but I wonder if these models take into account the different 'sizes' of the items. What I mean is that the change in 10 items for the large municipality generally producing hundreds of statements per year should be treated differently from the similar situation for a small municipality which usually produces something slightly above zero.


Since you have difference sizes in your municipalities, you may consider modeling the rate of statements given the population size of a municipality rather than just the frequency of statements in a Poisson regression. This could control for these differences, assuming the frequency that you receive a statement scales by population size.

The standard Poisson general linear model can be re-written from using the absolute frequency of statements: $$\log S_i = \beta_0 + \beta_1x_{i1} + ...$$ where $S_i$ is the number of statements (either total or negative) for a municipality and the rest is the features and coefficients and intercept of the model, to the following: $$\log \frac{S_i}{s_i} = \beta_0 + \beta_1x_{i1} + ...$$ where $s_i$ is the population size municipality $i$ (which I assuming is known and not random). $\frac{S_i}{s_i}$ is the rate of statements for a municipality given its population size, which could control for the problem you have identified. This can be re-written equivalently as $$\log S_i = \log s_i + \beta_0 + \beta_1x_{i1} + ...$$ which gets you back to a form closer to the normal Poisson regression. The $\log s_i$ term is your offset in the model so that you are modeling the differences in the rate of statements across municipalities instead of the absolute count.

Now, this rate is also assuming the number of statements a person makes is similar across the municipality. If you have a small subset that submits more statements (e.g., that guy who always complains), then you may have to adjust this.

You could also try to stratify your municipalities by population size (e.g., small, medium, big), which then you can treat the municipality size as a random effect in your model in order to try and control for this difference.

  • $\begingroup$ fantastic, thanks a lot for the very detailed answer! do you think it makes sense instead of including the population size, to include a total number of complaints as a factor for number of negative complaints? Or since these two are so dependent it will produce multicollinearity? $\endgroup$ – David Pekker Mar 12 '18 at 0:41
  • $\begingroup$ I think it could make sense in place of the total population as an offset factor, but it probably does not make sense as a standalone factor in your model (which may mask the importance of other factors given the inherently dependency between these two metrics). The next best step is to treat this as a random effect or, depending on the range of values, as a fixed effect in your model. $\endgroup$ – Daniel Mar 12 '18 at 3:53
  • $\begingroup$ I think using the population size would be easier to communicate your model personally, since people think in terms of small/big cities rather than many or few statements. $\endgroup$ – Daniel Mar 12 '18 at 3:54

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.