lag.listw(spdep)
lag.listw()所属R语言包:spdep
Spatial lag of a numeric vector
一个数值向量空间滞后
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Using a listw sparse representation of a spatial weights matrix, compute the lag vector V x
使用一个listw空间权重矩阵的稀疏表示,计算的滞后向量V x的
用法----------Usage----------
## S3 method for class 'listw'
lag(x, var, zero.policy=NULL, NAOK=FALSE, ...)
参数----------Arguments----------
参数:x
a listw object created for example by nb2listw
例如创建一个listw对象的nb2listw
参数:var
a numeric vector the same length as the neighbours list in listw
一个数值向量相同的长度的邻居列表中listw
参数: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
参数:NAOK
If 'FALSE', the presence of 'NA' values is regarded as an error; if 'TRUE' then any 'NA' or 'NaN' or 'Inf' values in var are represented as an NA lagged value.
如果FALSE,NA值的存在被认为是一个错误;如果TRUE,那么任何“NA”或“南”或“天道酬勤”VAR值,表示为NA滞后值。
参数:...
additional arguments
额外的参数
值----------Value----------
a numeric vector the same length as var
一个数值向量相同的长度为var
(作者)----------Author(s)----------
Roger Bivand <a href="mailto:Roger.Bivand@nhh.no">Roger.Bivand@nhh.no</a>
参见----------See Also----------
nb2listw
nb2listw
实例----------Examples----------
data(oldcol)
Vx <- lag.listw(nb2listw(COL.nb, style="W"), COL.OLD$CRIME)
plot(Vx, COL.OLD$CRIME)
plot(ecdf(COL.OLD$CRIME))
plot(ecdf(Vx), add=TRUE, col.points="red", col.hor="red")
is.na(COL.OLD$CRIME[5]) <- TRUE
VxNA <- lag.listw(nb2listw(COL.nb, style="W"), COL.OLD$CRIME, NAOK=TRUE)
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|