
Geographically weighted regression: coefficients, diagnostics and GLMs
Source:R/GwrLegacy.R
gwrcoef.RdFront-ends and extensions of GWRBasic (an intercept is prepended when
X has no constant column): gwrcoef local coefficients, gwrres
residuals, gwrstd standard errors, gwrhat the hat-matrix diagonal,
gwrcv the leave-one-out CV score (GWmodel::gwr.cv), gwrdlt the
Leung-Mei-Zhang F tests (GwrFTests), gwrtst the Monte Carlo test of
coefficient variability with Philox permutations (GWmodel::gwr.montecarlo),
gwrfwl the local Frisch-Waugh-Lovell coefficients of X2 net of
X1, gwrsur equation-by-equation GW-SUR with local residual
covariances, and gwrpois / gwrlgt the local-scoring GW Poisson and
logistic regressions (GWmodel::ggwr.basic with tol = 1e-5, maxiter = 20).
Usage
gwrcoef(y, X, coords, bw = 0.5, kernel = "bisquare", adaptive = FALSE)
gwrres(y, X, coords, bw = 0.5, kernel = "bisquare", adaptive = FALSE)
gwrstd(y, X, coords, bw = 0.5, kernel = "bisquare", adaptive = FALSE)
gwrhat(y, X, coords, bw = 0.5, kernel = "bisquare", adaptive = FALSE)
gwrcv(y, X, coords, bw = 0.5, kernel = "bisquare", adaptive = FALSE)
gwrdlt(
y,
X,
coords,
bw = 0.5,
kernel = "bisquare",
adaptive = FALSE,
method = "leung"
)
gwrtst(
y,
X,
coords,
bw = 0.5,
nsim = 9,
seed = 0,
kernel = "bisquare",
adaptive = FALSE
)
gwrfwl(y, X1, X2, coords, bw = 0.5, kernel = "bisquare", adaptive = FALSE)
gwrsur(ys, X, coords, bw = 0.5, kernel = "bisquare", adaptive = FALSE)
gwrpois(
y,
X,
coords,
bw = 0.5,
kernel = "bisquare",
adaptive = FALSE,
tol = 1e-10,
maxiter = 200
)
gwrlgt(
y,
X,
coords,
bw = 0.5,
kernel = "bisquare",
adaptive = FALSE,
tol = 1e-10,
maxiter = 200
)Arguments
- y
Response.
- X
Regressors.
- coords
Two-column coordinates.
- bw
Bandwidth (distance, or neighbour count when adaptive).
- kernel
Kernel name (see
GWRKernelWeights).- adaptive
Adaptive bandwidth.
- method
"leung" or "gwmodel" for the F tests.
- nsim
Number of permutations.
- seed
Philox seed.
- X1
Regressors partialled out.
- X2
Regressors of interest.
- ys
List of response vectors (one per equation).
- tol
Relative log-likelihood tolerance.
- maxiter
Maximum number of local-scoring passes.
Value
gwrcoef, gwrstd matrices (one row per location); gwrres,
gwrhat vectors; gwrcv a number; the others lists.
References
Brunsdon, C., Fotheringham, A. S. and Charlton, M. E. (1996). Geographically weighted regression: a method for exploring spatial nonstationarity. Geographical Analysis 28, 281-298. Brunsdon, C., Fotheringham, A. S. and Charlton, M. (1998). Geographically weighted regression - modelling spatial non-stationarity. The Statistician 47, 431-443. Leung, Y., Mei, C.-L. and Zhang, W.-X. (2000). Statistical tests for spatial nonstationarity based on the geographically weighted regression model. Environment and Planning A 32, 9-32. Nakaya, T., Fotheringham, A. S., Brunsdon, C. and Charlton, M. (2005). Geographically weighted Poisson regression for disease association mapping. Statistics in Medicine 24, 2695-2717. Zellner, A. (1962). An efficient method of estimating seemingly unrelated regressions. JASA 57, 348-368.