Calculate a distance vector(matrix) between any Geographically Weigthed (GW) model calibration point(s) and the data points
Focus
: an integer, indexing to the current GW model point, if focus=0, all the distances between all the GW model calibration points and data points will be calculated and a distance matrix will be returned; if 0<focus<length(number of data points), then the distances between the ’focus’th GW model points and data points will be calculated and a distance vector will be returned
Power
: the power of the Minkowski distance,default is 2, i.e. the Euclidean distance.
Figure 1. Minkowski distance
Theta (Angle in radians)
: an angle in radians to rotate the coordinate system, default is 0
longlat
: if TRUE, great circle distances will be calculated
Returns a numeric distance matrix or vector (if focus > 0); matrix with its rows corresponding to the observations and its columns corresponds to the GW model calibration points.
After loading data, to generate the distance matrix, you must select the appropriate arguments (focus, power, and theta, longlat) and click on the Run button (see video 1)
Gollini, I., Lu, B., Charlton, M., Brunsdon, C., & Harris, P. (2015). GWmodel: An R Package for Exploring Spatial Heterogeneity Using Geographically Weighted Models. Journal of Statistical Software, 63(17), 1–50. https://doi.org/10.18637/jss.v063.i17