# What does residual map explain?

I am modelling count data of migration flow (from origin to destination) with several explanatory variables using negative binomial regression.

Flow from i to j ~ Distance from i to j + socio-economic characteristics at i + socio-economic characteristics at j


I then calculate the residuals and mapped it using the origin and destination spatial units. What does residual map really explain beside over or under predictions? I also did a spatial autocorrelation test of the residual for each map and the result is not significant meaning the distribution of the residuals are random instead of clustering. How can I interpret more?

• The interpretation of these particular maps depends on the nature of the quantity you are modeling, such as whether it is a total or an average over each region. BTW, the last label in the legend ought to read "<-50" unless you intend it as some kind of catch-all for residuals whose values might be unknown (and therefore don't fall into any of the preceding classes) but are definitely greater than -50. About 3% to 6% of your readers won't be able to decipher any of these maps because they are deuteranopes: consider a better color scheme. – whuber Mar 22 '19 at 18:28
• @whuber I have corrected the legend. It is total number of residuals in each region. Alright, I will change the colour later. Any idea on the interpretation? – Hakim Danial Mar 22 '19 at 18:40
• Could you explain how a "total number" could be negative? And if you really mean just the total, that will be uninterpretable without additional information, such as how many residuals contribute to each region. – whuber Mar 22 '19 at 18:56
• Hakim, it looks like your unit of observation is a district in what I assume is Malaysia. Thus, you only have one residual per district. However, your legend says "number of residuals", implying that there are actually many observations per district. That's what is confusing @whuber and myself. Perhaps you meant the value of the residual? – Weiwen Ng Mar 22 '19 at 19:09
• @Weiwen Ng Yes it is District in Malaysia. Yes it is the value of the residual. I have corrected it. Thanks! – Hakim Danial Mar 22 '19 at 19:12

As spoken in the comments, you fit a negative binomial regression, where the dependent value is the count of migrations into and out of each district (i.e. each political subdivision). The unit of observation is the district. You have the residuals for each district, and as you stated, the residual is just observed value - predicted value.