neighborhood(sna)
neighborhood()所属R语言包:sna
Compute Neighborhood Structures of Specified Order
计算邻域结构的指定顺序
译者:生物统计家园网 机器人LoveR
描述----------Description----------
For a given graph, returns the specified neighborhood structure at the selected order(s).
对于一个给定的图,在选定的顺序(S)返回指定的邻域结构。
用法----------Usage----------
neighborhood(dat, order, neighborhood.type = c("in", "out", "total"),
mode = "digraph", diag = FALSE, thresh = 0, return.all = FALSE,
partial = TRUE)
参数----------Arguments----------
参数:dat
one or more graphs.
一个或多个图形。
参数:order
order of the neighborhood to extract.
顺序提取的附近。
参数:neighborhood.type
neighborhood type to employ.
邻里型采用。
参数:mode
"digraph" if dat is directed, otherwise "graph".
"digraph"如果dat的指示,否则"graph"。
参数:diag
logical; do the diagonal entries of dat contain valid data?
逻辑做的对角元素dat包含有效的数据?
参数:thresh
dichotomization threshold to use for dat; edges whose values are greater than thresh are treated as present.
dat;边缘,其值大于thresh目前被视为使用二分法阈值。
参数:return.all
logical; return neighborhoods for all orders up to order?
逻辑返回街区的所有订单到order?
参数:partial
logical; return partial (rather than cumulative) neighborhoods?
逻辑返回部分(而不是累计)的社区吗?
Details
详细信息----------Details----------
The adjacency matrix associated with the ith order neighborhood is defined as the identity matrix for order 0, and otherwise depends on the type of neighborhood involved. For input graph G=(V,E), let the base relation, R, be given by the underlying graph of G (i.e., G U G^T) if total neighborhoods are sought, the transpose of G if incoming neighborhoods are sought, or G otherwise. The partial neighborhood structure of order i>0 on R is then defined to be the digraph on V whose edge set consists of the ordered pairs (j,k) having geodesic distance i in R. The corresponding cumulative neighborhood is formed by the ordered pairs having geodesic distance less than or equal to i in R.
与相关联的邻接矩阵i阶邻域被定义为0阶的单位矩阵,并以其他方式取决于所涉及的类型的附近。输入图G=(V,E),让碱基的关系,R,底层的图G(即G U G^T)如果总邻里要求,在转G如果传入的社区,或寻求G否则。为了局部邻域结构i>0R被定义为有向图上V的边集组成的有序对(j,k)测地距离i 中R。相应的累积分数:形成由有序对具有测地距离小于或等于i在R。
Neighborhood structures are commonly used to parameterize various types of network autocorrelation models. They may also be used in the calculation of certain types of local structural indices; gapply provides an alternative function which can be used for this purpose.
邻域结构常用到各类网络自相关模型的参数。它们也可以用在某些类型的局部结构指数的计算;gapply提供了一种替代的功能,可用于这一目的。
值----------Value----------
An array or adjacency matrix containing the neighborhood structures (if dat is a single graph); if dat contains multiple graphs, then a list of such structures is returned.
含有的邻域结构(如果dat是一个单一的图形);如果dat包含多个图形,然后这种结构的列表,返回一个数组或邻接矩阵。
(作者)----------Author(s)----------
Carter T. Butts <a href="mailto:buttsc@uci.edu">buttsc@uci.edu</a>
参见----------See Also----------
gapply, nacf
gapply,nacf
实例----------Examples----------
#Draw a random graph[绘制一个随机的图形]
g<-rgraph(10,tp=2/9)
#Show the total partial out-neighborhoods[显示全部偏出社区]
neigh<-neighborhood(g,9,neighborhood.type="out",return.all=TRUE)
par(mfrow=c(3,3))
for(i in 1:9)
gplot(neigh[i,,],main=paste("Partial Neighborhood of Order",i))
#Show the total cumulative out-neighborhoods[累计总出社区]
neigh<-neighborhood(g,9,neighborhood.type="out",return.all=TRUE,
partial=FALSE)
par(mfrow=c(3,3))
for(i in 1:9)
gplot(neigh[i,,],main=paste("Cumulative Neighborhood of Order",i))
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|