gwr.sel(spgwr)
gwr.sel()所属R语言包:spgwr
Crossvalidation of bandwidth for geographically weighted regression
交叉验证的带宽GEO加权回归
译者:生物统计家园网 机器人LoveR
描述----------Description----------
The function finds a bandwidth for a given geographically weighted regression by optimzing a selected function. For cross-validation, this scores the root mean square prediction error for the geographically weighted regressions, choosing the bandwidth minimizing this quantity.
函数找到一个带宽对于一个给定的GEO加权回归通过optimzing选定的功能。交叉验证,这个分数的根均方预测误差为GEO加权回归,数量尽量减少这种选择的带宽。
用法----------Usage----------
gwr.sel(formula, data=list(), coords, adapt=FALSE, gweight=gwr.Gauss,
method = "cv", verbose = TRUE, longlat=NULL, RMSE=FALSE, weights,
tol=.Machine$double.eps^0.25)
参数----------Arguments----------
参数:formula
regression model formula as in lm
回归模型公式lm
参数:data
model data frame as in lm, or may be a SpatialPointsDataFrame or SpatialPolygonsDataFrame object as defined in package sp
模型数据框在lm,或可能是一个SpatialPointsDataFrame或SpatialPolygonsDataFrame在套件sp中定义的对象作为
参数:coords
matrix of coordinates of points representing the spatial positions of the observations
代表的观测值的空间位置的坐标的点矩阵
参数:adapt
either TRUE: find the proportion between 0 and 1 of observations to include in weighting scheme (k-nearest neighbours), or FALSE — find global bandwidth
TRUE:找到的比例在0和1之间的观测,包括权重方案(k-最近邻居),或FALSE - 寻找全局带宽
参数:gweight
geographical weighting function, at present gwr.Gauss() default, or gwr.gauss(), the previous default or gwr.bisquare()
GEO加权函数,目前gwr.Gauss()默认情况下,或gwr.gauss(),以前的默认或gwr.bisquare()
参数:method
default "cv" for drop-1 cross-validation, or "aic" for AIC optimisation (depends on assumptions about AIC degrees of freedom)
默认情况下下拉式交叉验证,或“AIC”的AIC优化(AIC自由度依赖于假设的“CV”)
参数:verbose
if TRUE (default), reports the progress of search for bandwidth
如果是TRUE(默认),报告的进展,带宽的搜索
参数:longlat
TRUE if point coordinates are longitude-latitude decimal degrees, in which case distances are measured in kilometers; if x is a SpatialPoints object, the value is taken from the object itself
TRUE,如果点坐标的经纬度小数度,在这种情况下,测量距离(公里),如果x是一个SpatialPoints,对象,对象本身的价值是从
参数:RMSE
default FALSE to correspond with CV scores in newer references (sum of squared CV errors), if TRUE the previous behaviour of scoring by LOO CV RMSE
默认情况下,FALSE对应在新的参考文献(CV得分总和平方CV错误),如果为true,以前的行为得分由LOO CV RMSE
参数:weights
case weights used as in weighted least squares, beware of scaling issues — only used with the cross-validation method, probably unsafe
作为加权最小二乘的情况下,权重,要小心的比例问题 - 仅用于交叉验证的方法,可能是不安全的
参数:tol
the desired accuracy to be passed to optimize
所需的精度将被传递给optimize
值----------Value----------
returns the cross-validation bandwidth.
返回的交叉验证的带宽。
注意----------Note----------
Use of method="aic" results in the creation of an n by n matrix, and should not be chosen when n is large.
使用方法=“AIC”在创建一个n×n矩阵,当n足够大时,不应该选择。
(作者)----------Author(s)----------
Roger Bivand <a href="mailto:Roger.Bivand@nhh.no">Roger.Bivand@nhh.no</a>
参考文献----------References----------
Geographically Weighted Regression, Chichester: Wiley;
参见----------See Also----------
gwr.bisquare, gwr.gauss
gwr.bisquare,gwr.gauss
实例----------Examples----------
data(columbus)
gwr.sel(crime ~ income + housing, data=columbus,
coords=cbind(columbus$x, columbus$y))
## Not run: [#不运行:]
gwr.sel(crime ~ income + housing, data=columbus,
coords=cbind(columbus$x, columbus$y), gweight=gwr.bisquare)
## End(Not run)[#(不执行)]
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|