Spatial Effects and Externalities Philip A. Viton November 5, Philip A. Viton CRP 66 Spatial () Externalities November 5, / 5
Introduction If you do certain things to your property for example, paint your house regularly this may increase the value of my property, if I am your neighbor. This is an instance of a phenomenon called an externality, or spillover effect. You do something, but I get (some of) the benefit, and this is not realized through the price system (You don t get any of the increase in my property value when I sell my house). The same thing applies if you are induced to do something by a public policy. So these externalities may be important sources of benefits in any public project, but especially in the sorts of projects undertaken by planners. The question is, can our empirical methods reveal the impacts of spatial externalities? Philip A. Viton CRP 66 Spatial () Externalities November 5, / 5
Externalities in Linear Models Consider our usual linear model of property values p i = β + β A i + β E i where i denotes the property in question, A i is the level of some amenity, and E i is a vector of everything else. We know that the impact of a unit change in A i on p i is given by p/ A i which for the linear model here is just β. Now consider the impact of a change in my property value p i of a change in an amenity A j on some other property, j. In this case we see that the impact, p i / A j is computed to be zero. In other words, in the models we ve considered up to now, the impact on my property value of something you do to improve your property is zero. The same applies to the other specifications (semi-log, log-log, Box-Cox) that we have considered. Thus, our models cannot account for spatial externalities. Philip A. Viton CRP 66 Spatial () Externalities November 5, / 5
Spatial Neighbors (I) Let s see how our modelling could accommodate these effects. The first step is to clarify what it is to be a spatial neighbor. This is generally done via a spatial neighbors matrix W. The (i, j) element of this (W ij ) tells us the extent (degree) to which property i is a neighbor of property j. We take the diagonal elements W ii to be zero : property i is not a neighbor of itself. Philip A. Viton CRP 66 Spatial () Externalities November 5, 4 / 5
Spatial Neighbors (II) In studies where the geographical regions are fixed for example, states or counties one often takes W to be an indicator of spatial contiguity, that is, W ij = if i and j share a boundary, and zero otherwise. So the s in row i of W will pick out the neighbors of i. Philip A. Viton CRP 66 Spatial () Externalities November 5, 5 / 5
Spatial Neighbors : Example (I) 5 4 W = In this system, for example, area has neighbors (areas, and 5), area 4 has neighbors (areas and 5), etc. Philip A. Viton CRP 66 Spatial () Externalities November 5, 6 / 5
Spatial Neighbors : Example (II) It is often convenient to consider a row-standardized form of W in which each element of a row of W is divided by the sum of all the elements in that row. This form is often referred to as a spatial weights matrix. So the row-standardized spatial neighbors (= spatial weights) matrix is: W = Philip A. Viton CRP 66 Spatial () Externalities November 5, 7 / 5
Spatial Weights When W is row-standardized, for any spatial characteristic A, each element of the product WA represents the average of the values of A, where the average is taken over the neighbors of each geographical element (elements for which W ij = ). Philip A. Viton CRP 66 Spatial () Externalities November 5, 8 / 5
Spatial Weights: Example Suppose we have a variable A with values A = (A, A, A, A 4, A 5 ) for each of the areas in our spatial system. Then using the row-standardized spatial weights matrix we compute the matrix product: WA = A A A A 4 A 5 = (A + A + A 5 ) (A + A ) (A + A + A 4 ) (A + A 5 ) (A + A 4 ) So we see that each element of the product is the average value of A for that observation s spatial neighbors. Philip A. Viton CRP 66 Spatial () Externalities November 5, 9 / 5
Spatial Neighbors in Property-Values Models If we are analyzing a sample of property-sales data, this approach neighbors indicated by spatial contiguity will probably not help, since relatively few perhaps none of the sales will be next door (ie contiguous) to a given property sold. In this case we can set up the spatial neighbors matrix as reflecting the distance between any two observations. Since the neighbors matrix is supposed to indicate closeness, we focus on inverse distance and define: W ij = d ij where d ij is distance between properties i and j. As always, we take W ii =. We can use this as a spatial weights matrix, or we can standardize it by the sum of the distances in each row, as before. Philip A. Viton CRP 66 Spatial () Externalities November 5, / 5
Local Spatial Effects (I) Suppose believe that p i is influenced not only by A i but also by the levels of A observed at i s immediate neighbors. Because only i s immediate neighbors matter, this is a model of local spatial effects. Philip A. Viton CRP 66 Spatial () Externalities November 5, / 5
Local Spatial Effects (II) Then an appropriate specification could be: p i = β + β A i + β WA + β E i where, as usual, E i is everything else relevant to the determination of p i. Then if property j is a spatial neighbor of property i and W is a row-standardized spatial weights matrix, it is easy to see that p i A j = β n i where n i is the number of spatial neighbors of property i. The important point here is that now changes in A j do have an estimable impact on p i. Philip A. Viton CRP 66 Spatial () Externalities November 5, / 5
General Spatial Effects Of course, this local-effects model has a major assumption: that only the local impacts matter. This model fails to capture another intuition: if I improve my property, this could raise your property values, if you re my neighbor. And this in turn could raise the property values of your neighbors, and so on. Here, the effects of changes at one location induce changes at (potentially) all other locations, whether immediate neighbors or not. However, as we get further away from the initial change, we expect the impacts to diminish. This is the idea of general spatial effects, and it can be modelled by a spatial autoregressive process, as we now discuss. Philip A. Viton CRP 66 Spatial () Externalities November 5, / 5
The Spatial Autoregressive Model (I) Let p be a column vector of observations on sales prices, and let X be a matrix of property characteristics: row i gives the characteristics of property i (so row i is the concatenation of what we previously referred to as A i and E i ). Then the spatial autoregressive (SAR) model specifies: p = λwp + X β + ε where λ is a parameter, and ε is a vector of iid normal error terms. This is like the standard regression model except for the addition of the term λwp. We can now see why we took W ii = : if we didn t, this would make the determination of p i (on the left) depend on the same p i (on the right), an obvious circularity. Philip A. Viton CRP 66 Spatial () Externalities November 5, 4 / 5
The Spatial Autoregressive Model (II) Starting with the model: p = λwp + X β + ε we can analyze it by collecting up terms. We have: p = λwp + X β + ε (I λw )p = X β + ε where I is the identity matrix. p = (I λw ) X β + (I λw ) ε In this model, spatial spillover is indicated by a non-zero λ : if λ = the model reduces to the standard linear model. When λ =, p i depends (through W ) on all the properties in the sample. Philip A. Viton CRP 66 Spatial () Externalities November 5, 5 / 5
Interpretations Consider the term (I λw ) and suppose that W is row-standardized. Then it can be shown that: (I λw ) = I + λw + λ W + λ W +... where I is the identity matrix. First, terms like W can be thought of as W W, the neighbors of W, or the neighbors of the original neighbors; and similarly for higher powers. (To see this more precisely, you need a result linking graph theory and matrix algebra (multiplication), which will not be given here). Next, if W is row-standardized, then each of its elements is less than, so as the powers increase, the individual terms get less and less important. This is how areas that are spatially remote from a given observation affect the left-hand-side (dependent variable) in the spatial autoregressive model, but at a diminishing rate. Philip A. Viton CRP 66 Spatial () Externalities November 5, 6 / 5
The Spatial Autoregressive Model : Example (I) We can see what is going on if we consider a sample of properties, and where the value of each property depends on just elements. Then we will have p ( ), W ( ), ε ( ) and X ( ). Write B = (I λw ) Then the model becomes: p = BX β + Bε = BX β + η where η = Bε. It is also important to remember that B depends on the unknown parameter λ : B is not just a data matrix. Philip A. Viton CRP 66 Spatial () Externalities November 5, 7 / 5
The Spatial Autoregressive Model : Example (II) Let s write out the equations of this model: p B B B X X p = B B B X X p B B B X X Or: ( β β ) + η η η p = β (B X + B X + B X ) + β (B X + B X + B X ) + η p = β (B X + B X + B X ) + β (B X + B X + B X ) + η p = β (B X + B X + B X ) + β (B X + B X + B X ) + η Philip A. Viton CRP 66 Spatial () Externalities November 5, 8 / 5
The Spatial Autoregressive Model : Example (III) Let s analyze the effects in this model. First, the own effect: the impact on the price of (say) property of a change in an own-characteristic, say X, is given by: p X = β B a bit more complicated than before, because of B (which depends on λ). The impact on p of a change in the level of a characteristic of another property (say X, the first characteristic of property ) which in the standard linear model was zero, is now: which will in general be non-zero. p X = β B Philip A. Viton CRP 66 Spatial () Externalities November 5, 9 / 5
The Spatial Autoregressive Model : Extensions There is an interesting special case. Suppose we focus on property (observation) k. And suppose that all properties in our sample receive a -unit increase in X (the second characteristic). Each of these increases will have some impact (depending on distance, via W ) on property k s value, ie on p k. If our estimate of λ is between and, and if W (the spatial weights matrix) is row-standardized, then Kim, Phipps and Anselin (J. Environmental Economics and Management,, footnote 4) show that the total impact on property k is: p k X = β λ Philip A. Viton CRP 66 Spatial () Externalities November 5, / 5
The Spatial Autoregressive Model : Summary The SAR model is therefore a way of allowing for and measuring general spatial externalities (spillovers) in our modelling. It is important to note than the regression coeffi cients β do not have the simple interpretation they had in the linear model for either the own-characteristic impact or the other-property impact. Philip A. Viton CRP 66 Spatial () Externalities November 5, / 5
Are There Spatial Effects? Before you get involved with this more complicated model setting, you might wonder: is it necessary? That is, given a dependent variable observed over space like p (the list of house selling prices), does it show spatial autocorrelation at all? If the answer is No, then there s probably no need to bother with the more complicated spatial regression models. There is a standard test for spatial autocorrelation in the literature, called Moran s Test (or Moran s I statistic). Most packages that accommodate spatial regression will allow you to compute this test statistic. Note that Moran s test depends on the particular spatial representation that you choose for your spatial neighbors or weights matrix: different matrices could give different answers. Philip A. Viton CRP 66 Spatial () Externalities November 5, / 5
Estimation Issues In the SAR model p = (I λw ) X β + (I λw ) ε the term (I λw ) is a complicated non-linear function of λ. This means that the model is no longer linear-in-parameters, and therefore cannot be estimated by standard regression techniques. Specialized software is needed: among the packages that can estimate this model are Luc Anselin s stand-alone Geoda system (available free for most operating systems) and the spdep package (add-on) to the free R statistics system. I believe there is also a spatial add-on for the commercial Stata system. Unfortunately, as of now, the premier commercial package for discrete-choice models, LIMDEP/NLOGIT, does not cover spatial models. Philip A. Viton CRP 66 Spatial () Externalities November 5, / 5
Computational Issues (I) Non-spatial models can also be non-linear. But spatial models have another diffi culty. The spatial neighbors matrix W is n n, where n is the number of observations. It follows that (I λw ) is also n n, and the number of elements in either of these is n. For example, suppose you have observations on sales in your community. Then W is going to be a = 9 -element matrix. When the unit of observation is US counties of which there are about then W will have about = 9, 6, elements. All this can require significant storage. In other words, you may need to invert and keep track of some very large matrices. Philip A. Viton CRP 66 Spatial () Externalities November 5, 4 / 5
Computational Issues (II) However the problem can be mitigated if we know that each observation has relatively few neighbors. For example, for the US counties, the average number of contiguity-based neighbors is about 5. This means that the huge spatial neighbors matrix will be mostly s, and it should be possible to exploit this fact in order to reduce the computational and storage burden. This can in fact be done by considering W to be a so-called sparse matrix. Most spatial software goes to considerable lengths to cope with this issue: it is relatively easy to estimate models with n on the order of about, at least when the average number of neighbors is small. However, for significantly larger models this can easily occur for property-values models, where large samples are common data storage can be a serious issue. This includes the case where the spatial weights matrix is inverse-distance-based, since it is not sparse. Philip A. Viton CRP 66 Spatial () Externalities November 5, 5 / 5