gwr.bw | R Documentation |
This function helps choosing the optimal bandwidth for the simple Geographically Weighted Regression (GWR).
gwr.bw(formula, dframe, coords, kernel, algorithm="exhaustive",
optim.method="Nelder-Mead", b.min=NULL, b.max=NULL, step=NULL)
formula |
the local model formula using the same syntax used in the |
dframe |
a numeric data frame of at least two suitable variables (one dependent and one independent) |
coords |
a numeric matrix or data frame of two columns giving the X,Y coordinates of the observations |
kernel |
the kernel to be used in the regression. Options are "adaptive" or "fixed". The weighting scheme used here is defined by the bi-square function |
algorithm |
a character argument that specifies whether the function will use an |
optim.method |
the optimisation method to be used. A detailed discussion is available at the 'Details' section of the function |
b.min |
the minimum bandwidth. This is important for both algorithms. In the case of the |
b.max |
the maximum bandwidth. This is important for both algorithms. In the case of the |
step |
this numeric argument is used only in the case of a |
Please carefully read the optim (stats)
when using a heuristic
algorithm.
bw |
The optimal bandwidth (fixed or adaptive) |
CV |
The corresponding Cross Validation score for the optimal bandwidth |
CVs |
Available only in the case of the |
Large datasets increase the processing time.
Please select the optimisation algorithm carefully. To be on safe grounds use the "Brent" optim.method
with well defined b.min
and b.max
. This function needs further testing. Please report any bugs!
Stamatis Kalogirou <stamatis@lctools.science>
Fotheringham, A.S., Brunsdon, C., Charlton, M. (2000). Geographically Weighted Regression: the analysis of spatially varying relationships. John Wiley and Sons, Chichester.
Kalogirou, S. (2003) The Statistical Analysis and Modelling of Internal Migration Flows within England and Wales, PhD Thesis, School of Geography, Politics and Sociology, University of Newcastle upon Tyne, UK. https://theses.ncl.ac.uk/jspui/handle/10443/204
gwr
RDF <- random.test.data(9,9,3,"normal")
bw <- gwr.bw(dep ~ X1 + X2, RDF, cbind(RDF$X,RDF$Y), kernel = 'adaptive',
b.min = 54, b.max=55)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.