This function implements generalised GWR
ggwr.basic(formula, data, regression.points, bw, family =
"poisson", kernel = "bisquare", adaptive = FALSE, cv =
T, tol = 1e-05, maxiter = 20, p = 2, theta = 0,
longlat = F, dMat, dMat1) # S3 method for ggwrm
print(x, ...)
A list of class “ggwrm”:
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 “glm” which inherits from the class “lm”, see glm.
a SpatialPointsDataFrame (may be gridded), or SpatialPolygonsDataFrame object (see package “sp”), or sf object (see package “sf”) integrated with regression.points, GWR coefficient estimates, y value,predicted values, coefficient standard errors and t-values in its "data" slot.
a data vector consisting of the cross-validation data
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
a Spatial*DataFrame object, i.e. SpatialPointsDataFrame or SpatialPolygonsDataFrame as defined in package sp
bandwidth used in the weighting function, possibly calculated by bw.ggwr();fixed (distance) or adaptive bandwidth(number of nearest neighbours)
a description of the error distribution and link function to be used in the model, which can be specified by “poisson” or “binomial”
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
if TRUE calculate an adaptive kernel where the bandwidth 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)
if TRUE, cross-validation data will be calculated
the threshold that determines the convergence of the IRLS procedure
the maximum number of times to try the IRLS procedure
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 between regression points and observations, it can be calculated by the function gw.dist
a square distance matrix between each pair of observations, it can be calculated by the function gw.dist
an object of class “ggwrm”, returned by the function gwr.generalised
arguments passed through (unused)
Binbin Lu binbinlu@whu.edu.cn
Nakaya, T., A. S. Fotheringham, C. Brunsdon & M. Charlton (2005) Geographically weighted Poisson regression for disease association mapping. Statistics in Medicine, 24, 2695-2717.
Nakaya, T., M. Charlton, S. Fotheringham & C. Brunsdon. 2009. How to use SGWRWIN (GWR4.0). Maynooth, Ireland: National Centre for Geocomputation.
Fotheringham S, Brunsdon, C, and Charlton, M (2002), Geographically Weighted Regression: The Analysis of Spatially Varying Relationships, Chichester: Wiley.
data(LondonHP)
if (FALSE) {
DM<-gw.dist(dp.locat=coordinates(londonhp))
bw.f1 <- bw.ggwr(BATH2~FLOORSZ,data=londonhp, dMat=DM)
res.poisson<-ggwr.basic(BATH2~FLOORSZ, bw=bw.f1,data=londonhp, dMat=DM)
bw.f2 <- bw.ggwr(BATH2~FLOORSZ,data=londonhp, dMat=DM,family ="binomial")
res.binomial<-ggwr.basic(BATH2~FLOORSZ, bw=bw.f2,data=londonhp, dMat=DM,
family ="binomial")
}
Run the code above in your browser using DataLab