nacf(sna)
nacf()所属R语言包:sna
Sample Network Covariance and Correlation Functions
样本的网络协方差和相关函数
译者:生物统计家园网 机器人LoveR
描述----------Description----------
nacf computes the sample network covariance/correlation function for a specified variable on a given input network. Moran's I and Geary's C statistics at multiple orders may be computed as well.
nacf计算的指定的变量在一个给定的输入网络的示例网络协方差/相关函数。莫兰I和Geary的C统计多个订单可能会被计算为好。
用法----------Usage----------
nacf(net, y, lag.max = NULL, type = c("correlation", "covariance",
"moran", "geary"), neighborhood.type = c("in", "out", "total"),
partial.neighborhood = TRUE, mode = "digraph", diag = FALSE,
thresh = 0, demean = TRUE)
参数----------Arguments----------
参数:net
one or more graphs.
一个或多个图形。
参数:y
a numerical vector, of length equal to the order of net.
一个数值向量,长度等于net的顺序。
参数:lag.max
optionally, the maximum geodesic lag at which to compute dependence (defaults to order net-1).
可选,最大的大地测量学的滞后计算的依赖(默认为订购net-1)。
参数:type
the type of dependence statistic to be computed.
类型的依赖统计计算。
参数:neighborhood.type
the type of neighborhood to be employed when assessing dependence (as per neighborhood).
评估依赖(每neighborhood)时,附近的类型。
参数:partial.neighborhood
logical; should partial (rather than cumulative) neighborhoods be employed at higher orders?
逻辑,在较高的订单部分(而不是累计)的社区吗?
参数:mode
"digraph" for directed graphs, or "graph" if net is undirected.
"digraph"对于有向图,或"graph"如果net是无向的。
参数:diag
logical; does the diagonal of net contain valid data?
逻辑,但对角线的net包含有效的数据?
参数:thresh
threshold at which to dichotomize net.
阈值二分net。
参数:demean
logical; demean y prior to analysis?
逻辑;贬低y之前的分析吗?
Details
详细信息----------Details----------
nacf computes dependence statistics for the vector y on network net, for neighborhoods of various orders. Specifically, let A_i be the ith order adjacency matrix of net. The sample network autocovariance of y on A_i is then given by
nacf计算依赖统计的向量y网络上的net,为各种订单的区域。具体来说,我们A_i是i阶邻接矩阵的net。的样本网络自相关yA_i然后由
</i>
</ P>
</i>
</ P>
</i>
</ P>
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. For purposes of nacf, these neighborhoods are calculated using neighborhood, with the specified parameters (including dichotomization at thresh).
与相关联的邻接矩阵i阶邻域被定义为0阶的单位矩阵,并以其他方式取决于所涉及的类型的附近。输入图G=(V,E),让碱基的关系,R,底层的图G(即G U G^T)如果总邻里要求,在转G如果传入的社区,或寻求G否则。为了局部邻域结构i>0R被定义为有向图上V的边集组成的有序对(j,k)测地距离i 中R。相应的累积分数:形成由有序对具有测地距离小于或等于i在R。为了nacf,这些居民区使用neighborhood,用指定的参数(包括二分法thresh计算)。
The return value for nacf is the selected dependence statistic, calculated for each neighborhood structure from order 0 (the identity) through order lag.max (or N-1, if lag.max==NULL). This vector can be used much like the conventional autocorrelation function, to identify dependencies at various lags. This may, in turn, suggest a starting point for modeling via routines such as lnam.
nacf的返回值是选定的依赖统计,从顺序0(标识)通过计算每一个邻域结构lag.max(N-1如果lag.max==NULL)。该向量很像传统的自相关函数,可以使用,以确定在不同的滞后的依赖。这可能,反过来,建议通过例程如lnam建模的一个起点。
值----------Value----------
A vector containing the dependence statistics (ascending from order 0).
一个向量,包含的依赖统计(升序从0阶)。
(作者)----------Author(s)----------
Carter T. Butts <a href="mailto:buttsc@uci.edu">buttsc@uci.edu</a>
参考文献----------References----------
Geary, R.C. (1954). “The Contiguity Ratio and Statistical Mapping.” The Incorporated Statistician, 5: 115-145.
Moran, P.A.P. (1950). “Notes on Continuous Stochastic Phenomena.” Biometrika, 37: 17-23.
参见----------See Also----------
geodist, gapply, neighborhood, lnam, acf
geodist,gapply,neighborhood,lnam,acf
实例----------Examples----------
#Create a random graph, and an autocorrelated variable[创建一个随机图,自相关变量]
g<-rgraph(50,tp=4/49)
y<-qr.solve(diag(50)-0.8*g,rnorm(50,0,0.05))
#Examine the network autocorrelation function[检查网络的自相关函数]
nacf(g,y) #Partial neighborhoods[部分街区]
nacf(g,y,partial.neighborhood=FALSE) #Cumulative neighborhoods[累计街区]
#Repeat, using Moran's I on the underlying graph[重复使用莫兰我对底层的图]
nacf(g,y,type="moran")
nacf(g,y,partial.neighborhood=FALSE,type="moran")
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|