This function implements Scalable GWR for large dataset
gwr.scalable(formula, data, bw.adapt=100, kernel = "gaussian", polynomial = 4,
p = 2, theta = 0, longlat = F, dMat)
# S3 method for scgwrm
print(x, ...)
A list of class “scgwrm”:
a list class object including the model fitting parameters for generating the report file
a list class object including the diagnostic information of the model fitting
an object of class inheriting from “lm”, see lm.
a SpatialPointsDataFrame (may be gridded), or SpatialPolygonsDataFrame object (see package “sp”), or sf object (see package “sf”) integrated with fit.points,GWR coefficient estimates, y value,predicted values, coefficient standard errors and t-values in its "data" slot.
starting and ending time.
Regression model formula of a formula object
a Spatial*DataFrame, i.e. SpatialPointsDataFrame or SpatialPolygonsDataFrame as defined in package sp, or a sf object defined in package sf
adaptive bandwidth (i.e. number of nearest neighbours) used for geographically weighting
Kernel function to calculate the spatial weights, but note only two continuous functions available:
gaussian: wgt = exp(-.5*(vdist/bw)^2);
exponential: wgt = exp(-vdist/bw);
Degree of the polyunomial to approximate the kernel function, and default is 4.
the power of the Minkowski distance, default is 2, i.e. the Euclidean distance
an angle in radians to rotate the coordinate system, default is 0
if TRUE, great circle distances will be calculated
a pre-specified distance matrix, it can be calculated by the function gw.dist
an object of class “scgwrm”, returned by the function gwr.scalable
arguments passed through (unused)
Binbin Lu binbinlu@whu.edu.cn
Murakami, D., N. Tsutsumida, T. Yoshida, T. Nakaya & B. Lu (2019) Scalable GWR: A linear-time algorithm for large-scale geographically weighted regression with polynomial kernels. arXiv:1905.00266.
if (FALSE) {
require(spData)
data(boston)
boston <- boston.c
coordinates(boston) <- ~ LON + LAT
res <- gwr.scalable(formula = MEDV ~ CRIM + ZN + INDUS + CHAS + AGE, data = boston, bw.adapt = 100)
res
}
Run the code above in your browser using DataLab