Solved – Feasibility of Negative Binomial Spatial Regression

autocorrelationgeneralized linear modelnegative-binomial-distributionspatialstata

I have a set of crime count data where it appears that the data take on a negative binomial distribution. I have had some success converting the dependent variable (a crime count) into a rate and then log-transforming it and using a log-log Spatial Durbin model or Spatial Lag and Spatial Error models.

Conversely, I have run a negative binomial regression on the count data (with a population offset) with no consideration for the spatial autocorrelation.

I am wondering if anyone has found a reliable way to apply spatial autoregressive techniques to GLMs (NB, Poisson). If anyone has been successful with this in Stata, I would be particularly curious to learn how.

If I were to run nbreg in Stata but applying my weights matrix and lagging the dependent variable, am I able to directly interpret the coefficient on that term as I would the rho term in a spatial lag regression (of course with considering how the NB coefficients differ from ones generated by an OLS)?

Best Answer

The Poisson model (and subsequently the negative binomial) can not have an endogenous spatial lag, as it implies the distribution is non-stationary (when the autoregressive term is positive). Consider a simpler example with time series data. With a linear model, let's say we estimate the equation (with an autoregressive term):

$$y_t = 0.5 \cdot y_{t-1} + e$$

Now let's say the series at $t_0 = 0$, and at time $t_1$ there is a shock in the system of $4$, what happens to this shock over time?

$$\begin{array} \\ y_1 = 4 \\ y_2 = 0.5 \cdot 4 = 2 \\ y_3 = 0.5 \cdot 2 = 1 \\ y_4 = 0.5 \cdot 1 = 0.5 \\ \vdots \end{array}$$

The overall effect of that shock eventually decays into $0$. What happens with a Poisson (and subsequently the negative binomial) model and the exponential function?

$$y_t = \exp(0.1 \cdot y_{t-1})$$

\begin{array} \\ y_1 = 4 \\ y_2 = \exp(0.1 \cdot 4) \approx 1.5 \\ y_3 = \exp(0.1 \cdot 1.5) \approx 1.2 \\ y_4 = \exp(0.1 \cdot 1.2) \approx 1.1 \\ \vdots \end{array}

In the limit this simply goes to $1.1$, and so this shock never wears off. If you fill in the numbers with an autoregressive term of $0.5$ instead you will have an explosive term. Whether the term is explosive or not depends on the size of the shock, with the relationship being $\exp(a \cdot x) < x$. So any shock not satisfying the relationship $a < \log(x)/x$ will be explosive, and any autoregressive term over $\log(3)/3 \approx 0.37$ will be explosive for any sized shock to the system for positive integers. The same problem occurs for models with spatial lags instead of time lags.

How have people dealt with this for spatial models of counts? Typically people focus on modelling the autocorrelation in the errors of the system, as opposed to an endogenous spatial lag (for a counter-example see Lambert et al. (2010) - in which the AR term is the log of the spatial lag plus a small constant). Modelling the error can be done in a few different ways though, it can be done by including terms based on the spatial location or other ways (e.g. eigenvector terms based on the weighted residuals), see Dormann et al., (2007) for a review. For another unique approach see Bhati (2008) (who released SAS macros to estimate such models).

A popular approach in epidemiology is to estimate conditional autoregressive models, which are conceptually a bit different but popular in a Bayesian approach (it is more like using the spatial lag as an offset). Skrondal and Rabe-Hesketh (2004) have an example in Stata.

Although it is basically a de facto standard now in academic work to use negative binomial models for count crime data, personally, my experience with count crime data makes me think modelling the counts using OLS is not all that bad (the exponential function has its own problems).

Related Question