Spatial Lag Residual Plot


The residual plot is a graph that displays residual value or the difference between the observed value of the dependent variable (\(y\)) and the predicted value (\(\hat{y}\)). It is used to check for fitness of the spatial lag model. More discussion and explanation of spatial lag models can be found here.


To show the model in action, we will run the tool looking at a spatial lag model of effect of income on rent across Melbourne. In doing so, we assume that the Lagrange Multipliers test has indicated that a spatial lag model is the appropriate treatment for this dataset, as opposed to the Spatial Error Model.

Once you have done this, open the Spatial Lag Residual Plot (Tools → Charts → Spatial Lag Residual Plot) and enter the parameters as shown in the image below (these are explained in more detail after the image)

[Click to Enlarge]

[Click to Enlarge]

  • Dataset Input: Select the spatialised dataset for which you would like to generate the graph. In this instance we select SPATIALISED SA2-based T02 Selected Medians and Averages as at 2011-08-11
  • Spatial Weights Matrix: Select the spatial weights matrix that you generated which will be used to feed into the spatial lag model. In this instance we select CONTIG SWM FOR SPATIALISED SA2-based T02 Selected Medians and Averages as at 2011-08-11
  • Key Column: Select the column in the spatialised dataset which specifies the unique codes for your areas. In this instance we select ASGS 2011
  • Dependent Variable: Select the variable that you would like to be explained by the model (i.e. the Y variable). In this instance we select Median rent ($/weekly)
  • Independent Variables: Select the variables that you would like to test as explanatory variables for the variation in Y (i.e. the X variables). You can select more than one, although in this instance, we are selecting only Median total family income ($/weekly)
  • Chart Title: Create a name for your graph. In this instance we have called the graph SPATIAL LAG RESIDUAL PLOT Median Income vs Median Rent Adelaide SA2s
  • Grid: Keep this checked if you want grid lines on the graph (default), or unchecked if you want it clear
  • Greyscale: Keep this unchecked if you want a colour graph (default) or checked if you want it to be greyscale

Once you have added all the parameters, click Add and Run to execute the tool


Once your tool has run, click the Display button on the pop up dialogue box that appears. Your graph should look something like the image shown below

[Click to Enlarge]

[Click to Enlarge]


  1. Cressie, N. A. C. (1991) Statistics for spatial data, New York: Wiley.
  2. Olive, D. J. (2013) Plots, Prediction and Testing for the Multivariate Linear Model, preprint, see ( ).
  3. Hofe, R. (2010) Residual plot, N. Salkind (Ed.), Encyclopedia of research design, pp. 1263 – 1268, Thousand Oaks, CA: SAGE Publications, Inc.