Geographically Weighted Regression is a technique for exploratory spatial data analysis. The technique is explained in detail in the references on this website. Software is also available for fitting GWR models to your spatial data – follow the relevant links above.

In “normal” regression we assume that the relationship we are modelling holds everywhere in the study area – that is, the regression parameters are “whole-map” statistics. In many situtations this is not necessarily the case, as mapping the residuals (the difference between the observed and predicted data) may reveal. Many different solutions have been proposed for dealing with spatial variation in the relationship. GWR provides an elegant and easily grasped means of modelling such relationships.

A ‘normal’ regression model with one predictor variable can be written:

y = β_{0} + β_{1}x_{1} + ε

where y is the dependent variable, x1 is the independent variable, b0 and b1, are the parameters to be estimated, and e is a random error term, assumed to be normally distributed. The assumption is that the values of b0 and b1 are constant across the study area. This means that if there is any geographic variation in the relationship then it must be confined to the error term. Is there some way in which we can treat this relationship in such a manner that it is not a residual?

Suppose we had some location in the study area (**u**), perhaps one of the data points, with spatial coordinates (u,v). We can rewrite the model thus:

y(**u**) = β_{0}(**u**) + β_{1}x_{1}(**u**) + ε(**u**)

This can be fitted by least squares to give an estimate of the parameters at the location (**u**) and a predicted value. This is achieved through the implementation of the geographical weighting scheme. Details are to be found on the primer page. The weighting scheme is organised such that data nearer (**u**) is given a heavier weight in the model than data further away.

The (**u**)s are typically the locations at which data are collected. This allows a separate estimate of the parameters to be made at each data point. The resulting parameter estimates can them be mapped. Various diagnostic measures are also available such as the Akaike Information Criterion, local standard errors, local measures of influence, and a local goodness of fit. If the (**u**)s are at the mesh points of a regular grid, then the spatial variation in the parameter estimates can be examined as a pseudo-surface.

The parameters may be tested for ‘significant’ spatial variation. The outputs from the software provide a convenient linkage to mapping software (ArcMap, MapInfo) as well as a comma-separated variable file for input to other statistical programs such as SPSS or R.

Different model forms are possible depending on the type of response varibale you have. If the response variable can sensibly take any value on the real line then a ‘standard’ Gaussian model is available. If the response variable takes the values 0/1 only (presence/absence, true/false) then a logistic model will provide location specific estimates of the probability of the response variable being unity. If the data are positive integer counts, then a Poisson model may be appropriate. The implementation of GWR in our software allows an offset variable to be specified if there is a varying underlying population to be included in the model. For instance, a Poisson model of the counts of unemployed males in a set of zones might use the count of economically active males as an offset.

**GWR under the bonnet**

There are, perhaps, thousands of examples of the use of multiple regression modelling in geographical enquiry. Typically these will involve estimating the relationship between one variable and a set of predictor variables for a collection of geographical entities (often a set of points, or zones). As an illustration, we might have a model with two predictor variables:

y = β_{0} + β_{1}x_{1} + ε

where y is the dependent variable, x1 and x2 are the independent variables, b0, b1 and b2, are the parameters to be estimated, and e is a random error term, assumed to be normally distributed. A basic assumption in fitting such a model is that the observations are independent of one another. With much geographical data, this is unlikely to be the case. A second assumption that we make is that the structure of the model remains constant over the study area, in other words, there are no local variations in the parameter estimates.

GWR permits the parameter estimates to vary locally; we can rewrite the model in a slightly different form:

y = β_{0}(**u**) + β_{1}x_{1}(**u**) + β_{2}x_{2}(**u**) + ε(**u**)

where (**u**) indicates that the parameters are to be estimated at a location whose coordinates are given by the vector g.

How do we estimate the parameters for such a model?

Using OLS, the parameters for a linear regression model can be obtained by solving:

β = (X^{T}X)^{-1}X^{T}Y

The parameter estimates for GWR may be solved using a weighting scheme:

β = (X^{T}W(**u**)X)^{-1}X^{T}W(**u**)Y

The weights are chosen such that those observations near the point in space where the parameter estimates are desired have more influence on the result than observations further away. Two functions we have used for the weight calculation have been (a) bi-square and (b) Gaussian. In the case of the Gaussian scheme, the weight for the ith observation is:

w_{i} = exp(-d_{i}/h)2

where d_{i} is the Euclidean distance between the location of observation i and location **u**, and h is a quantity known as the bandwidth. (There are similarities between GWR and kernel regression). One characteristic that is not immediately obvious, is that the locations at which parameters are estimated need not be the ones at which the data have been collected.

The resulting parameter estimates may be mapped in order to examine local variations in the parameter estimates. One might also map the standard errors of the parameters estimates as well. Hypothesis tests are possible – for example one might wish to test whether or not the variations in the values of a parameter in the study area are due to chance.

The bandwidth may be either supplied by the user, or estimated using a technique such as crossvalidation.