Learn R Programming

GWmodel (version 2.4-1)

gwr.mink.approach: Minkovski approach for GWR

Description

This function implements the Minkovski approach to select an 'optimum' distance metric for calibrating a GWR model.

Usage

gwr.mink.approach(formula, data, criterion="AIC", bw, bw.sel.approach = "AIC",adaptive=F, 
              kernel="bisquare", p.vals=seq(from=0.25, to=8, length.out=32), p.inf = T,
                          theta.vals = seq(from=0, to=0.5*pi, length.out=10), verbose=F, 
                          nlower = 10)

Value

A list of:

diag.df

a data frame with four columns (p, theta, bandwidth, AICc/CV), each row corresponds to a calibration

coefs.all

a list class object including all the estimated coefficients

Arguments

formula

Regression model formula of a formula object

data

a Spatial*DataFrame, i.e. SpatialPointsDataFrame or SpatialPolygonsDataFrame as defined in package sp, or a sf object defined in package sf

criterion

the criterion used for distance metric selection, AICc ("AICc") or cross-validation ("CV") score; default is "AICc"

bw

bandwidth used in the weighting function, possibly calculated by bw.gwr;fixed (distance) or adaptive bandwidth(number of nearest neighbours)

bw.sel.approach

approach used to seclect an optimum bandwidth for each calibration if no bandwidth (bw) is given; specified by CV for cross-validation approach or by AIC corrected (AICc) approach

adaptive

if TRUE calculate an adaptive kernel where the bandwidth (bw) corresponds to the number of nearest neighbours (i.e. adaptive distance); default is FALSE, where a fixed kernel is found (bandwidth is a fixed distance)

kernel

function chosen as follows:

gaussian: wgt = exp(-.5*(vdist/bw)^2);

exponential: wgt = exp(-vdist/bw);

bisquare: wgt = (1-(vdist/bw)^2)^2 if vdist < bw, wgt=0 otherwise;

tricube: wgt = (1-(vdist/bw)^3)^3 if vdist < bw, wgt=0 otherwise;

boxcar: wgt=1 if dist < bw, wgt=0 otherwise

p.vals

a collection of positive numbers used as the power of the Minkowski distance

p.inf

if TRUE, Chebyshev distance is tried for model calibration, i.e. p is infinity

theta.vals

a collection of values used as angles in radians to rotate the coordinate system

verbose

if TRUE and bandwidth selection is undertaken, the bandwidth searches are reported

nlower

the minmum number of nearest neighbours if an adaptive kernel is used

Author

Binbin Lu binbinlu@whu.edu.cn

References

Lu, B, Charlton, M, Brunsdon, C & Harris, P(2016). The Minkowski approach for choosing the distance metric in Geographically Weighted Regression. International Journal of Geographical Information Science, 30(2): 351-368.