找回密码
 注册
查看: 1681|回复: 0

R语言 spdep包 localG()函数中文帮助文档(中英文对照)

  [复制链接]
发表于 2012-9-30 14:40:35 | 显示全部楼层 |阅读模式
localG(spdep)
localG()所属R语言包:spdep

                                        G and Gstar local spatial statistics
                                         G和的GSTAR本地空间统计

                                         译者:生物统计家园网 机器人LoveR

描述----------Description----------

The local spatial statistic G is calculated for each zone based on the spatial weights object used. The value returned is a Z-value, and may be used as a diagnostic tool. High positive values indicate the posibility of a local cluster of high values of the variable being analysed, very low relative values a similar cluster of low values. For inference, a Bonferroni-type test is suggested in the references, where tables of critical values may be found (see also details below).
局部空间统计G被反对使用的空间权重的基础上为每个区域计算。返回的值是一个Z值,并可以被用作一种诊断工具。高的正值表示被分析的变量,一个类似的聚类的非常低的相对值低的值的高值的本地聚类posibility。进行推理,邦费罗尼类型的测试,建议在参考文献中,在那里可能会发现表中的临界值(见下面还详细介绍)。


用法----------Usage----------


localG(x, listw, zero.policy=NULL, spChk=NULL)



参数----------Arguments----------

参数:x
a numeric vector the same length as the neighbours list in listw
一个数值向量相同的长度的邻居列表中listw


参数:listw
a listw object created for example by nb2listw
例如创建一个listw对象的nb2listw


参数:zero.policy
default NULL, use global option value; if TRUE assign zero to the lagged value of zones without neighbours, if FALSE assign NA
默认为空,请使用全局选项的值,如果真没有邻居的滞后值的区域分配了零,如果为FALSE分配NA


参数:spChk
should the data vector names be checked against the spatial objects for identity integrity, TRUE, or FALSE, default NULL to use get.spChkOption()
应的数据向量空间对象的名称进行核对身份完整性,TRUE,否则返回FALSE,默认为空,使用get.spChkOption()


Details

详细信息----------Details----------

If the neighbours member of listw has a "self.included" attribute set to TRUE, the Gstar variant, including the self-weight w_{ii} > 0, is calculated and returned.  The returned vector will have a "gstari" attribute set to TRUE.  Self-weights can be included by using the include.self function in the spweights package before converting the neighbour list to a spatial weights list with nb2listw as shown below in the example.
如果的邻居成员listw的有一个“self.included”的属性设置为TRUE,GSTAR的变体,包括自重w_{ii} > 0,计算并返回。返回的向量将有一个“gstari”属性设置为TRUE。自权重可以使用include.self功能在spweights包,然后将其转换邻居列表空间权重列表nb2listw如下图所示的例子。

The critical values of the statistic under assumptions given in the references for the 95th percentile are for n=1: 1.645, n=50: 3.083, n=100: 3.289, n=1000: 3.886.
在参考文献中的第95个百分位数的假设条件下的临界值的统计为n = 1:1.645,N = 50:3.083,N = 100:3.289,N = 1000:3.886。


值----------Value----------

A vector of G or Gstar values, with attributes "gstari" set to TRUE or FALSE, "call" set to the function call, and class "localG".
一个矢量的G或GSTAR值,带有属性“gstari”设置为TRUE或FALSE,“呼”的函数调用,类的“localG”。


(作者)----------Author(s)----------


Roger Bivand <a href="mailto:Roger.Bivand@nhh.no">Roger.Bivand@nhh.no</a>



参考文献----------References----------

statistics: distributional issues and an application. Geographical Analysis, 27, 286&ndash;306; Getis, A. and Ord, J. K. 1996 Local spatial statistics: an overview. In P. Longley and M. Batty (eds) Spatial analysis: modelling in a GIS environment (Cambridge: Geoinformation

实例----------Examples----------


data(getisord)
xycoords <- cbind(xyz$x, xyz$y)
nb30 <- dnearneigh(xycoords, 0, 30)
G30 <- localG(xyz$val, nb2listw(nb30, style="B"))
G30[length(xyz$val)-136]
nb60 <- dnearneigh(xycoords, 0, 60)
G60 <- localG(xyz$val, nb2listw(nb60, style="B"))
G60[length(xyz$val)-136]
nb90 <- dnearneigh(xycoords, 0, 90)
G90 <- localG(xyz$val, nb2listw(nb90, style="B"))
G90[length(xyz$val)-136]
nb120 <- dnearneigh(xycoords, 0, 120)
G120 <- localG(xyz$val, nb2listw(nb120, style="B"))
G120[length(xyz$val)-136]
nb150 <- dnearneigh(xycoords, 0, 150)
G150 <- localG(xyz$val, nb2listw(nb150, style="B"))
G150[length(xyz$val)-136]
brks <- seq(-5,5,1)
cm.col <- cm.colors(length(brks)-1)
image(x, y, t(matrix(G30, nrow=16, ncol=16, byrow=TRUE)),
  breaks=brks, col=cm.col, asp=1)
text(xyz$x, xyz$y, round(G30, digits=1), cex=0.7)
polygon(c(195,225,225,195), c(195,195,225,225), lwd=2)
title(main=expression(paste("Values of the ", G[i], " statistic")))
G30s <- localG(xyz$val, nb2listw(include.self(nb30),
style="B"))
cat("value according to Getis and Ord's eq. 14.2, p. 263 (1996)\n")
G30s[length(xyz$val)-136]
cat(paste("value given by Getis and Ord (1996), p. 267",
  "(division by n-1 rather than n \n in variance)\n"))
G30s[length(xyz$val)-136] *
  (sqrt(sum(scale(xyz$val, scale=FALSE)^2)/length(xyz$val)) /
  sqrt(var(xyz$val)))
image(x, y, t(matrix(G30s, nrow=16, ncol=16, byrow=TRUE)),
  breaks=brks, col=cm.col, asp=1)
text(xyz$x, xyz$y, round(G30s, digits=1), cex=0.7)
polygon(c(195,225,225,195), c(195,195,225,225), lwd=2)
title(main=expression(paste("Values of the ", G[i]^"*", " statistic")))

转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。


注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

手机版|小黑屋|生物统计家园 网站价格

GMT+8, 2025-5-13 11:15 , Processed in 0.022714 second(s), 16 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表