# Negative Count Variables in Data — modeling migration

I'm trying to explain migration rates in Europe with my regression using pca/pcr in glm. Of course some of the count data has to be negative in regions people move out of. This presents a problem for my regression, since I wanted to use the Poisson distribution (tip from my supervisor), which I obviously can't with the negative values in my data.

How can I work around this? Which other models could be used?

One thing i already did too, but not sure if I CAN do it: I just used the regions with positive migration ratios. But I'm sure this somehow skews my results even tho I get many significant regressors.

This is more of a modeling issue than a negative count issue. The count of people leaving a region is just as "positive" a number as the count of people entering a region; you've simply chosen to code it as a negative number because you are thinking of it in terms of net population changes in a region instead of population flows between regions.

If you are modeling the flow $$x_{ijt}$$ from region $$i$$ to region $$j$$ in time period $$t$$, you can easily set up the regression(s) so that $$x_{ijt} \geq 0$$. In fact, setting the first index to be equal to the source region and the second to be equal to the destination region accomplishes this for you without any additional effort, as, if the flow $$x_{ijt}$$ is negative, the source region is actually $$j$$ and the destination region is actually $$i$$, and switching the indices reverses the sign.

If you are simply modeling the flows into and out of a region, you can construct two regressions, one for the source regions and one for the destination regions. There are lots of reasons why people might leave a region that are of little relevance to their choice of destination and vice versa, so the two models would almost certainly have overlapping, but not identical, sets of features (independent variables.) This would likely be an inferior model to the detailed flow model, however, as people, except in extreme circumstances, don't tend to leave a region without having somewhere substantially better to go firmly in mind; this means the decision is based on a comparison of regions rather than on one region only. It isn't that common that "anywhere" is substantially better than where you are today, although of course there are plenty of examples of just that in human and European history.

• To clarify: I only have the balance/sum of people leaving and moving in for each region. But you bring up a valid point, I could try to put together a model explaining why people leave.. – Peteatwork12 Feb 7 at 15:34
• Does that mean you only have one number for each region for each time period? In that case, you're pretty much forced to the second approach. Note that, for example, people might leave, say, Germany due to high unemployment, but choose between relatively low unemployment France and Austria on the basis of language, so your outbound flow depends on employment but the inbound on employment and language. Also note that because the flows have to sum to zero, you lack independence between your observations, and this should be taken into account. – jbowman Feb 7 at 15:41
• I have one column in my excel sheet for the sum/balance of migration for a few hundred regions (rows) for 2015. So yes, I'm pretty limited. My supervisor told me to just use the poisson distribution, which i did in a fairly simple glm(x~y, family="poisson") model - but only with the positive migration regions. If I understand you correctly, this would be step 1 (of 2) from your approach, correct? On a sidenote: Actually since the population is growing and my flows include people of every age, the flows don't sum up to zero, they are slightly positive. – Peteatwork12 Feb 7 at 15:52

Counts cannot be negative by definition. You are not dealing with count data, so you need a model for non-count data, for example a model using a Skellam distribution (distribution for the difference between two Poisson-distributed random variables), there's even an R package for that.

• I just rechecked my available data and sadly I only have the balance/sum (sorry, don't know the correct word) for people leaving and migrating for my dependent variable. Thank you anyway! – Peteatwork12 Feb 7 at 15:32
• @Peteatwork12 Then, unless I'm missing something, Skellam distribution is the model for such data. – Tim Feb 7 at 15:35
• Maybe I am missing something here. I never heard of Skellam distribution until right now, so I checked out the package and searched for examples (which are quite limited). In my understanding I need to calculate the "x vector of integers" myself, but i can't since i only have one given column with the sum of migration for each region. Currently trying to fit my regression into the skellam frame, but lacking a guideline or deeper understanding. Like i posted above, i only have experience in glm or simple lqs models. – Peteatwork12 Feb 7 at 16:01
• @Peteatwork12 you don't. Skellam is a distribution for a random variable that is created by taking the difference of two Poisson-distributed random variables. You don't need the two variables, only their difference. – Tim Feb 7 at 16:10
• I just tried and clicked every result i could find on this topic. The best "guide" i could find was from stackexchange: stackoverflow.com/questions/32372062/… But I honestly still don't know how to fit my model into the the functions of this package. I have the same question as the OP in the topic posted. Can you point me in the right direction or give me an example? Really appreciate it! – Peteatwork12 Feb 7 at 18:21