A specific version of the function gw.glm
returning only the leave-one-out Cross Validation (CV) score. gw.glm.cv
exludes the observation for which a sub-model fits.
gw.glm.cv(bw, formula, family, dframe, obs, kernel, dmatrix)
Leave-one-out Cross Validation (CV) score
a positive number that may be an integer in the case of an "adaptive kernel" or a real in the case of a "fixed kernel". In the first case the integer denotes the number of nearest neighbours, whereas in the latter case the real number refers to the bandwidth (in meters if the coordinates provided are Cartesian).
the local model to be fitted using the same syntax used in the glm function in R. This is a sting that is passed to the sub-models' glm
function. For more details look at the class formula
.
a description of the error distribution and link function to be used in the local model as in the glm
function. Currently the only option tested is "poisson".
a numeric data frame of at least two suitable variables (one dependent and one independent)
number of observations in the global dataset
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 (weight = (1-(ndist/H)^2)^2
for distances less than or equal to H
, 0
otherwise)
eucledian distance matrix between the observations
Stamatis Kalogirou <stamatis.science@gmail.com>
Only used by gw.glm.bw
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
Kalogirou, S. (2016) Destination Choice of Athenians: an application of geographically weighted versions of standard and zero inflated Poisson spatial interaction models, Geographical Analysis, 48(2),pp. 191-230. DOI: 10.1111/gean.12092 https://onlinelibrary.wiley.com/doi/abs/10.1111/gean.12092
gw.glm.bw