getgraph(SIN)
getgraph()所属R语言包:SIN
Obtain graph from simultaneous p-values
同时p-值获取图
译者:生物统计家园网 机器人LoveR
描述----------Description----------
This function converts a matrix of simultaneous p-values into a graph by comparing the p-values to a user-provided significance level.
这个函数转换成的曲线图进行比较,一个用户提供的显着性水平的p值矩阵,同时p-值。
用法----------Usage----------
getgraph(pvals, alpha, type="UG", blocks=NULL)
参数----------Arguments----------
参数:pvals
a matrix of simultaneous p-values.
同时p-值的矩阵。
参数:alpha
a significance level, i.e., alpha in (0,1).
显着性水平,即,α-(0,1)中。
参数:type
a string specifying the type of graph that should be obtained from the p-value matrix. If type equals "UG" then an undirected graph is returned, if type equals "DAG" then an acyclic directed graph is returned, and if type equals "BG" then a bidirected graph is returned. If type equals the fourth possible choice "CG" then a chain graph is returned, in which case a list of integer vectors has to be provided as the input blocks.
一个字符串,指定应获得的p-值矩阵的图形类型。如果type等于"UG"然后返回一个无向图,如果type等于"DAG"无环图被返回,如果type等于"BG"然后一个bidirected的图形,则返回。如果类型等于第四个可能的选择"CG"然后链图返回整数向量的列表,在这种情况下,要提供作为输入blocks。
参数:blocks
a list of integer vectors specifying a family of subsets of the variables.
指定的变量的子集的一个家庭的整数向量的列表。
值----------Value----------
The function returns an adjacency matrix A with A[i,j]=0 if there is no edge between vertices (variables) i and j. The convention for edges is that i-j if and only if A[i,j]=A[j,i]=1, i->j if and only if A[i,j]=1 and A[j,i]=0, and i<->j if and only if A[i,j]=A[j,i]=2.
该函数返回一个邻接矩阵AA[i,j]=0,如果不存在边缘顶点之间(变量)i和j。 i-j当且仅当A[i,j]=A[j,i]=1,i->j当且仅当A[i,j]=1和A[j,i]=0和i<->j,如果和边缘的约定只有A[i,j]=A[j,i]=2。
实例----------Examples----------
data(fowlbones)
pvals <- sinUG(fowlbones$corr,fowlbones$n)
alpha <- 0.2
## get undirected graph[#无向图]
getgraph(pvals, alpha, type="UG")
## forget that we used sinUG and get acyclic directed graph[#忘记,我们使用sinUG并获得无环图]
getgraph(pvals, alpha, type="DAG")
## forget that we used sinUG and get bidirected graph[#忘记,我们使用sinUG,并得到bidirected图]
getgraph(pvals, alpha, type="BG")
## forget that we used sinUG and get chain graph[#忘记,我们使用的sinUG和链图]
myblocks <- list(1:2,3:4,5:6)
getgraph(pvals, alpha, type="CG", blocks=myblocks)
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|