Re: ArcGIS Pro 3.0.2: How the weight is calculated in the Geographically Weighted Regression (GWR)?

403
2
10-24-2023 10:12 AM
JamalNUMAN
Legendary Contributor

Many thanks, Robert, for your input.

Could you please move this post to be categorized under "spatial statistics tools"?

I have already referred to several peer-reviewed papers but couldn't find a single one that includes a concrete example of how 'W' is calculated. All of them show the equation for 'W' without explaining how it is calculated for a particular point.

While I found many examples of how IDW works, there is no similar material explaining how GWR works

 

Clip_458.jpgClip_454.jpgClip_455.jpgClip_456.jpgClip_457.jpg

----------------------------------------
Jamal Numan
Geomolg Geoportal for Spatial Information
Ramallah, West Bank, Palestine
0 Kudos
2 Replies
EricKrause
Esri Regular Contributor

Part of the confusion is that in principle, GWR doesn't require the weights to be assigned in any particular way.  So textbooks usually just give generic formulas that can apply to any weighting scheme you want.

Though as the name Geographically Weighted Regression suggests, the weight is almost always some function of geographic distance between the prediction location and the neighboring features (where closer neighbors get higher weights and, thus, more influence on the model). 

Kernel functions are the most common way to assign these weights, where the weight decreases with distance according to one of many possible kernels: https://en.wikipedia.org/wiki/Kernel_(statistics)

In ArcGIS Pro, the "Local Weighting Scheme" parameter lets you choose between Bisquare and Gaussian kernel functions.

In the very last image you posted, the blue cone around the prediction location is visualization of the kernel.  Imagine the height of that cone being the weight assigned to a neighbor.  Features close to the middle get the highest weight, and it decreases to zero after a certain radius around the prediction location.

JamalNUMAN
Legendary Contributor

Thank you, Eric Krause, for your input.

I'm currently grappling with how to determine the W matrix for a specific prediction. To clarify, let's consider a concrete example.

In the screenshot below:

  1. Point #7 represents the prediction point.
  2. The bandwidth is set at 120 meters.
  3. Within this 120-meter bandwidth, there are 16 points, including the prediction point.

Now, we can calculate the influence of the 15 neighboring points within the 120-meter bandwidth using the following equation:

 

Wij = e^(-dij/b)

 

As we have 16 points, this means that we need to calculate the following:

 

W17, W27, W37, W47, W57, W67, W77, W87, W97, W107, W117, W127, W137, W147, W157, W167

 

Where:

 

W17 = e^(-d17/b)

 

W71 is the influence of the point#1 on point #7 (prediction point)

d71 is the distance between point#1 and point #7

 

 

is this approach correct in constructing the W matrix for the prediction of point#7?

 

 

Clip_87.jpgClip_89.jpg

----------------------------------------
Jamal Numan
Geomolg Geoportal for Spatial Information
Ramallah, West Bank, Palestine
0 Kudos