# Feasibility of Negative Binomial Spatial Regression

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)?

• Note for readers: In spite of the mention of Stata in the title, this appears to be a primarily statistical question. – Glen_b Jan 27 '15 at 5:10
• N.B. NB = negative binomial here, not nota bene. – Nick Cox Jan 27 '15 at 14:34
• Also see the same question the OP asked on the GIS site. (Typically cross-posting is discouraged - welcome to the site.) – Andy W Jan 27 '15 at 15:16
• As of 7/24/2019, the GIS site pointed to by Andy W, has been removed, so is not available. – jeramy townsley Jul 24 at 16:17

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).

• What Andrew is calling an exponential link is, at least in my experience, more usually called a logarithmic link. Which way you think about it may influence what terminology is congenial, but that does not make such terminology standard. – Nick Cox Jan 27 '15 at 14:29
• Agree @NickCox - I just took out the word link. Writing the Poisson model as $\log(E[Y|X]) = \beta X$ shows why the log link is the typical terminology, but to get back to the expected value of $Y$ you need to exponentiate the right hand side. – Andy W Jan 27 '15 at 14:38
• The essence of this appears to be that additive shocks don't mix well with multiplicative models. The relevance of this thus should depend on how far it makes sense to imagine additive shocks when the "natural" or at least convenient scale to work on is logarithmic. A key rationale for a logarithmic link is to ensure positive predictions for the response; it is not clear that the awkwardness imagined here outweighs the major awkwardness of absurd predictions possible otherwise, such as negative counts for crimes, etc. – Nick Cox Jan 27 '15 at 14:39
• @NickCox my personal experience is that the exponential function does not on its face appear to be a reasonable fit for many of the situations I have dealt with (see one example from my dissertation). Negative predictions do not necessarily mean you can't make appropriate inferences from linear models (see Berk, et al. 2014 expressing a similar preference.) – Andy W Jan 27 '15 at 14:52
• As I talked about in my linked blog post, I've seen some pretty silly over predictions using the exponential function as well. – Andy W Jan 27 '15 at 14:53