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

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

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

                                        Moran's I test for spatial autocorrelation
                                         莫兰我的空间自相关测试

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

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

Moran's test for spatial autocorrelation using a spatial weights matrix in weights list form. The assumptions underlying the test are sensitive to the form of the graph of neighbour relationships and other factors, and results may be checked against those of moran.mc permutations.
莫兰使用空间权重矩阵中的权重列表的形式为空间自相关的测试。测试的基本假设是敏感的邻居关系和其他因素的影响图的形式和结果进行核对moran.mc排列。


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


moran.test(x, listw, randomisation=TRUE, zero.policy=NULL,
alternative="greater", rank = FALSE, na.action=na.fail, spChk=NULL, adjust.n=TRUE)



参数----------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


参数:randomisation
variance of I calculated under the assumption of randomisation, if FALSE normality
计算方差,我随机的假设下,如果为FALSE正常


参数: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


参数:alternative
a character string specifying the alternative hypothesis, must be one of greater (default), less or two.sided.
一个字符串,指定其他假设,必须有一个更大的(默认),少或two.sided的。


参数:rank
logical value - default FALSE for continuous variables, if TRUE, uses the adaptation of Moran's I for ranks suggested by Cliff and Ord (1981, p. 46)
逻辑值 - 连续变量默认为false,如果为true,则使用适应行列的莫兰的我的摩崖石刻和条例的建议(1981年,第46页)


参数:na.action
a function (default na.fail), can also be na.omit or na.exclude - in these cases the weights list will be subsetted to remove NAs in the data. It may be necessary to set zero.policy to TRUE because this subsetting may create no-neighbour observations. Note that only weights lists created without using the glist argument to nb2listw may be subsetted. If na.pass is used, zero is substituted for NA values in calculating the spatial lag
一个函数(默认na.fail),也可以是na.omit或na.exclude“ - 在这些情况下,将子集的权重列表中删除NAS的数据。这可能是必要的设置为TRUE zero.policy子集,因为这可能创建没有邻居观测。需要注意的是只重列表创建时没有使用的glist的参数nb2listw可能是子集。如果na.pass使用,零被取代的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()


参数:adjust.n
default TRUE, if FALSE the number of observations is not adjusted for no-neighbour observations, if TRUE, the number of observations is adjusted
默认为true,如果为FALSE未调整的若干意见没有邻居的意见,如果为TRUE,观测值的数量进行调整


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

A list with class htest containing the following components:
列表类htest包含以下组件:


参数:statistic
the value of the standard deviate of Moran's I.
标准值的偏离,莫兰的一


参数:p.value
the p-value of the test.
的p值的测试。


参数:estimate
the value of the observed Moran's I, its expectation and variance under the method assumption.
所观察到的莫兰我的价值,期望和方差的方法假设下。


参数:alternative
a character string describing the alternative hypothesis.
一个字符串,描述了另一种假设。


参数:method
a character string giving the assumption used for calculating the standard deviate.
一个字符字符串,给出了用于计算的标准偏离假设。


参数:data.name
a character string giving the name(s) of the data.
给予(s)的数据的名称的字符串。


注意----------Note----------

Var(I) is taken from Cliff and Ord (1969, p. 28), and  Goodchild's CATMOG 47 (1986), see also Upton & Fingleton (1985) p. 171; it agrees with SpaceStat, see Tutorial workbook Chapter 22; VI is the second crude moment minus the square of the first crude moment. The derivation of the test (Cliff and Ord, 1981, p. 18) assumes that the weights matrix is symmetric. For inherently non-symmetric matrices, such as k-nearest neighbour matrices, listw2U() can be used to make the matrix symmetric.
VAR(I)从悬崖条例“(1969年,第28页),古德柴尔德的CATMOG 47(1986),厄普顿芬格尔顿(1985),p。 171;它同意与SpaceStat的,请参阅教程工作簿的第22章;,VI是第二粗时刻的平方减去第一粗时刻。测试(摩崖石刻和条例,1981年,第18页)的推导假设的权重矩阵是对称的。对于固有的非对称矩阵,如k-最近邻矩阵,listw2U()可以用来使矩阵对称。


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


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



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

<h3>See Also</h3>

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


data(oldcol)
coords.OLD <- cbind(COL.OLD$X, COL.OLD$Y)
moran.test(COL.OLD$CRIME, nb2listw(COL.nb, style="W"))
moran.test(COL.OLD$CRIME, nb2listw(COL.nb, style="B"))
moran.test(COL.OLD$CRIME, nb2listw(COL.nb, style="C"))
moran.test(COL.OLD$CRIME, nb2listw(COL.nb, style="S"))
moran.test(COL.OLD$CRIME, nb2listw(COL.nb, style="W"),
randomisation=FALSE)
colold.lags <- nblag(COL.nb, 3)
moran.test(COL.OLD$CRIME, nb2listw(colold.lags[[2]],
style="W"))
moran.test(COL.OLD$CRIME, nb2listw(colold.lags[[3]],
style="W"))
print(is.symmetric.nb(COL.nb))
COL.k4.nb <- knn2nb(knearneigh(coords.OLD, 4))
print(is.symmetric.nb(COL.k4.nb))
moran.test(COL.OLD$CRIME, nb2listw(COL.k4.nb, style="W"))
moran.test(COL.OLD$CRIME, nb2listw(COL.k4.nb, style="W"),
randomisation=FALSE)
cat("Note: non-symmetric weights matrix, use listw2U()")
moran.test(COL.OLD$CRIME, listw2U(nb2listw(COL.k4.nb,
style="W")))
moran.test(COL.OLD$CRIME, listw2U(nb2listw(COL.k4.nb,
style="W")), randomisation=FALSE)
ranks <- rank(COL.OLD$CRIME)
names(ranks) <- rownames(COL.OLD)
moran.test(ranks, nb2listw(COL.nb, style="W"), rank=TRUE)
crime <- COL.OLD$CRIME
is.na(crime) <- sample(1:length(crime), 10)
res <- try(moran.test(crime, nb2listw(COL.nb, style="W"),
na.action=na.fail))
res
moran.test(crime, nb2listw(COL.nb, style="W"), zero.policy=TRUE,
na.action=na.omit)
moran.test(crime, nb2listw(COL.nb, style="W"), zero.policy=TRUE,
na.action=na.exclude)
moran.test(crime, nb2listw(COL.nb, style="W"), na.action=na.pass)

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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-6-17 21:18 , Processed in 0.033099 second(s), 16 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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