# Making spatial lag variable in ArcGIS Desktop?

How do I make a variable in ArcGIS 10 called a 'spatial lag'?

I'm trying to set up this variable in GIS for use in a regression model.

• This Q&A may be worth reviewing: gis.stackexchange.com/questions/63610/… Even if it does not provide you with an answer it may give some ideas for additional details to edit into your question to try and attract potential answerers. – PolyGeo Dec 6 '14 at 6:07
• Yes, for example defining 'spatial lag' and what formula it might use. What little I see in a quick search indicates that it's a model method itself, not just a variable. – Chris W Dec 6 '14 at 20:33
• Essentially the spatial lag variable creating by calculating the average of that variable in every neighbouring polygon. I'm trying to see if Arcgis can do the same thing. – user45217 Jan 19 '15 at 19:20
• It is actually the autocovariance and not the mean neighbor value(s). You will also need to decided what type of neighbor weighting scheme you want to apply (e.g., uniform, inverse distance, inverse distance squared, etc..). Without stepping out to python, I do not see you calculating a spatially lagged variable in ArcGIS. – Jeffrey Evans Jan 19 '15 at 19:31
• The general formula is: W(y)ij=sumj_(Wij yj)/ sumj_(Wij) where; Wij=1/Euclidian[i,j]. In an autologistic regression you spatially lag y and include it on the x side of the equation. However, issues arise if W(y) is correlated with any of the independent variables. It is much more robust to specify a mixed effects model with the matrix of W(y) as a random effect or solve an autologistic model in a Monte Carlo or MCMC. – Jeffrey Evans Jan 19 '15 at 19:42