ggwr.sel(spgwr)
ggwr.sel()所属R语言包:spgwr
Crossvalidation of bandwidth for generalised GWR
广义交叉验证的带宽GWR
译者:生物统计家园网 机器人LoveR
描述----------Description----------
The function finds a bandwidth for a given generalised geographically weighted regression by optimzing a selected function. For cross-validation, this scores the root mean square prediction error for the generalised geographically weighted regressions, choosing the bandwidth minimizing this quantity.
函数找到一个带宽对于一个给定的概括GEO加权回归通过optimzing选定的功能。交叉验证,这个分数的均方根预测误差的广义的GEO加权回归,数量尽量减少这种选择的带宽。
用法----------Usage----------
ggwr.sel(formula, data = list(), coords, adapt = FALSE, gweight = gwr.Gauss,
family = gaussian, verbose = TRUE, longlat = NULL, RMSE=FALSE,
tol=.Machine$double.eps^0.25)
参数----------Arguments----------
参数:formula
regression model formula as in glm
回归模型公式glm
参数:data
model data frame as in glm, or may be a SpatialPointsDataFrame or SpatialPolygonsDataFrame object as defined in package sp
模型数据框在glm,或可能是一个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()
参数:family
a description of the error distribution and link function to be used in the model, see glm
在模型中使用的误差分布和链接功能的描述,请参阅glm
参数: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
参数:tol
the desired accuracy to be passed to optimize
所需的精度将被传递给optimize
值----------Value----------
returns the cross-validation bandwidth.
返回的交叉验证的带宽。
注意----------Note----------
The use of GWR on GLM is only at the initial proof of concept stage, nothing should be treated as an accepted method at this stage.
使用GWR上GLM只在最初的概念证明阶段,也不应该被视为一个公认的方法,在这个阶段。
(作者)----------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.sel, ggwr
gwr.sel,ggwr
实例----------Examples----------
library(maptools)
xx <- readShapePoly(system.file("shapes/sids.shp", package="maptools")[1],
IDvar="FIPSNO", proj4string=CRS("+proj=longlat +ellps=clrk66"))
bw <- ggwr.sel(SID74 ~ I(NWBIR74/BIR74) + offset(log(BIR74)), data=xx,
family=poisson(), longlat=TRUE)
bw
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|