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

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

[复制链接]
发表于 2012-9-30 11:01:13 | 显示全部楼层 |阅读模式
rgnmix(sna)
rgnmix()所属R语言包:sna

                                         Draw Mixing-Conditioned Random Graphs
                                         绘制混合了空调的随机图的

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

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

rgnmix generates random draws from a mixing-conditioned uniform random graph distribution.
rgnmix生成随机抽取随机图分布均匀混合空调。


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


rgnmix(n, tv, mix, mode = "digraph", diag = FALSE,
    method = c("probability", "exact"), return.as.edgelist = FALSE)



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

参数:n
the number of graphs to generate.
的图形的数目来生成。


参数:tv
a vector of types or classes (one entry per vertex), corresponding to the rows and columns of mix.  (Note that the total number of vertices generated will be length(tv).)
一个向量的类型或类(每个顶点的一个条目),对应于行和列的mix。 (请注意,生成的顶点的总数将是length(tv))。


参数:mix
a class-by-class mixing matrix, containing either mixing rates (for method=="probability") or edge counts (for method=="exact").
一类级混合矩阵,无论是混合率(method=="probability")或的边计数(method=="exact")。


参数:mode
"digraph" for directed graphs, or "graph" for undirected graphs.
"digraph"对于有向图,或"graph"无向图。


参数:diag
logical; should loops be allowed?
逻辑;循环应该被允许吗?


参数:method
the generation method to use.  "probability" results in a Bernoulli edge distribution (conditional on the underlying rates), while "exact" results in a uniform draw conditional on the exact per-block edge distribution.
的生成的方法来使用。 "probability"结果在一个的伯努利边缘分布条件的基本税率,而"exact"结果在一个统一的抽奖条件的确切每块的边缘分布。


参数:return.as.edgelist
logical; should the resulting graphs be returned in sna edgelist form?
逻辑,产生的图形返回在SNA EdgeList都形式?


Details

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

The generated graphs (in either adjacency or edgelist form).
生成的图形(要么的邻接或EdgeList都表)。


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

rgnmix draws from a simple generalization of the Erdos-Renyi N,M family (and the related N,p family), generating graphs with fixed expected or realized mixing rates.  Mixing is determined by the mix argument, which must contain a class-by-class matrix of mixing rates (either edge probabilities or number of realized edges).  The class for each vertex is specified in tv, whose entries must correspond to the rows and columns of mix.  The resulting functionality is much like blockmodel.expand, although more general (and in some cases more efficient).
rgnmix吸引了来自鄂尔多斯仁义N,M系列(以及相关的N,P系列),生成图形与固定混合率的预期或实现一个简单的概括。混合mix参数,它必须包含一个类级矩阵的混合率(无论是边缘的概率或实现的边缘)。类中的每个顶点指定的tv,其参赛作品必须符合的行和列的mix。由此产生的功能很像blockmodel.expand,但更普遍的(在某些情况下更有效)。


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



Carter T. Butts <a href="mailto:buttsc@uci.edu">buttsc@uci.edu</a>




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

Wasserman, S. and Faust, K.  (1994).  Social Network Analysis: Methods and Applications.  Cambridge: Cambridge University Press.

参见----------See Also----------

rguman, rgnm, blockmodel.expand
rguman,rgnm,blockmodel.expand


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


#Draw a random mixing matrix[画一个随机混合矩阵]
mix<-matrix(runif(9),3,3)

#Generate a graph with 4 members per class[生成每类图的4名成员]
g<-rgnmix(1,rep(1:3,each=4),mix)
plot.sociomatrix(g)                                 #Visualize the result[可视化的结果]

#Repeat the exercise, using the exact method[重复练习,使用的确切方法]
mix2&lt;-round(mix*8)                                  #Draw an exact matrix[绘制一个确切的矩阵]
g<-rgnmix(1,rep(1:3,each=4),mix2,method="exact")
plot.sociomatrix(g)

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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-6-8 03:20 , Processed in 0.029694 second(s), 16 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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