# Distance Spatial Weight Matrix

## Contents

## Distance Matrices

There are a number of methods that have been developed to determine the closeness or nearness between locations.

Among some of the easiest to calculate are the “distance” or “threshold” spatial weights matrices. These methods are based on neighbouring areas meeting a specific spatial distance criterion being counted equally as “close”, while all those not meeting the criterion are “not close”. Similar to contiguous spatial weights matrices, all “close” areas are equally weighted, irrespective of their specific distances.

There are two main kinds of Distance Spatial Weights Matrices implemented in AURIN.

#### k-nearest neighbours

Here we specify that an area is close if it is one of the nearest \(k\) number of neighbours to the areas of interest. Normally, for polygons, this is the distance between the centroid of the area of interest, and the centroids of the surrounding areas. For the example Canberra meshblocks below, we have specified that we want to consider the 7 nearest neighbours to be “close” (blue) and all other areas to be “not close” (green).

#### Threshold distance

In contrast to the the **k-nearest neighbours**** **method, the threshold distance specifies that an area is close if the distance between it and the area of interest \(d_{i,j}\) is less than a specified maximum distance, \(d_{max}\). If \(d_{i,j} > d_{max}\), then the area is not counted as “close”. This is represented by the equation below, and illustrated in the figure below, where all areas that are closer to the area of interest (red point) than \(d_{max}\) are shown in blue.

\(\begin{equation*}

w_{i,j} = \left\{

\begin{array}{rl}

1 & \text{if } 0 \leq d_{i,j} \leq d_{max}\\

0 & \text{if } d_{i,j} > d_{max}

\end{array} \right.

\end{equation*}\)

## Inputs

To illustrate the Distance Spatial Weights Matrix in use, we will use socio-economic data for Perth

**Select***Perth GCCSA*as your area**Select***SA2 SEIFA 2011 – The Index of Relative Socio-Economic Advantage and Disadvantage (IRSAD)*as your dataset, selecting all variables**Spatialise**your dataset, naming it something like*SPATIALISED SEIFA IRSAD Perth*

Once you have loaded and spatialised your dataset, navigate to the Distance Spatial Weights Matrix tool (*Tools → Spatial Statistics → Distance Spatial Weights Matrix*) and enter the parameters as shown below. These are also explained below the image

*Dataset Input**:*The dataset that you would like to calculate the spatial weights matrix – this must be**spatialised**in order for this tool to be run (either by spatialising an AURIN dataset with the spatialise tool, or by**uploading**a shapefile). Here we select*SPATIALISED SEIFA IRSAD Perth**Type:**k-nearest neighbour*matrix in this analysis*Threshold distance or K parameter:**5*as your parameter*Style:**binary*,*row-standardised*(default) or*globally-standardised*. Choose*row-standardised**Island Parameter:*

Once you have entered your parameters click *Add and Run *to execute the tool

## Outputs

Once you have executed the tool, you should see an output appear in your *Data* panel. If you open this, you should see something like this:

This spatial weights matrix can now be used for additional spatial statistical analysis, such as Moran’s I or Geary’s C.

## References

O’Sullivan, D. & D. Unwin. 2010. Geographic Information Analysis. Wiley and Sons