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

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

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

                                        Spatial weights matrices for neighbours lists
                                         空间权重矩阵的邻居列表

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

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

The function generates a weights matrix for a neighbours list with spatial weights for the chosen coding scheme.
函数生成一个权重矩阵的邻居列表的空间权重选择的编码方案。


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


nb2mat(neighbours, glist=NULL, style="W", zero.policy=NULL)
listw2mat(listw)



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

参数:neighbours
an object of class nb
一个对象的类nb


参数:glist
list of general weights corresponding to neighbours
一般的权重对应的邻居列表


参数:style
style can take values W, B, C, and S
style可以采取的值W,B,C,和S的


参数:zero.policy
default NULL, use global option value; if FALSE stop with error for any empty neighbour sets, if TRUE permit the weights list to be formed with zero-length weights vectors
默认为空,使用全局选项的值,如果为FALSE停止错误任何空的邻居集,如果真要形成与长度为零的权重向量允许的权重列表


参数:listw
a listw object from for example nb2listw
一个listw的对象例如nb2listw


Details

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

Starting from a binary neighbours list, in which regions are either listed as neighbours or are absent (thus not in the set of neighbours for some definition), the function creates an n by n weights matrix with values given by the coding scheme style chosen. B is the basic binary coding, W is row standardised, C is globally standardised, while S is the variance-stabilizing coding scheme proposed by Tiefelsdorf et al. 1999, p. 167-168.
开始从一个二进制邻居列表中,在哪些区域被列为邻居或不存在(因此不是集合中的一些定义的邻居),由n个权重矩阵,函数创建一个n值的编码方案,风格选择。 B是基本的二进制编码,W是行标准化,C是全球统一的,而S是的方差稳定的编码方案提出的Tiefelsdorf等。 1999年,p。 167-168。

The function leaves matrix rows as zero for any regions with zero neighbours fore zero.policy TRUE. These will in turn generate lag values of zero, equivalent to the sum of products of the zero row t(rep(0, length=length(neighbours))) %*% x, for arbitraty numerical vector x of length length(neighbours). The spatially lagged value of x for the zero-neighbour region will then be zero, which may (or may not) be a sensible choice.
此功能使矩阵的行为零点零邻居脱颖而出zero.policy TRUE的任何区域。这些都将进而产生滞后值为零,相当于零行的总和的产品t(rep(0, length=length(neighbours))) %*% x,为arbitraty的数值向量x长度length(neighbours)。零邻域空间的x的滞后值将为零,这可能会(也可能不会)是一个明智的选择。


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

An n by n matrix, where n=length(neighbours)
一个n×n矩阵,其中n =长度(邻居)


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


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



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

<h3>See Also</h3>

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


example(columbus)
coords <- coordinates(columbus)
col005 <- dnearneigh(coords, 0, 0.5, attr(col.gal.nb, "region.id"))
summary(col005)
col005.w.mat <- nb2mat(col005, zero.policy=TRUE)
table(round(apply(col005.w.mat, 1, sum)))

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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-6-18 04:14 , Processed in 0.020164 second(s), 15 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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