There are two functions, gwr.sel, that determines the bandwidth, and gwr that runs the model based on the given bandwidth. The bandwidth used in Videras (2014) is called gwr.bisquare here.
bwG <- gwr.sel(model, data = data, gweight = gwr.bisquare, verbose = FALSE)
gwrG <- gwr(model, data = data, bandwidth = bwG, gweight = gwr.bisquare, hatmatrix = TRUE)
> gwr.bisquare
function (dist2, d)
{
d2 <- d^2
w <- ifelse(dist2 > d2, 0, (1 - (dist2/d2))^2)
w
}
There are two functions,
gwr.sel
, that determines the bandwidth, andgwr
that runs the model based on the given bandwidth. The bandwidth used in Videras (2014) is calledgwr.bisquare
here.