cugtest(sna)
cugtest()所属R语言包:sna
Perform Conditional Uniform Graph (CUG) Hypothesis Tests for Graph-Level Indices
执行条件的统一图的假设检验走势级指数(CUG)
译者:生物统计家园网 机器人LoveR
描述----------Description----------
cugtest tests an arbitrary GLI (computed on dat by FUN) against a conditional uniform graph null hypothesis, via Monte Carlo simulation. Some variation in the nature of the conditioning is available; currently, conditioning only on size, conditioning jointly on size and estimated tie probability (via expected density), and conditioning jointly on size and (bootstrapped) edge value distributions are implemented. Note that fair amount of flexibility is possible regarding CUG tests on functions of GLIs (Anderson et al., 1999). See below for more details.
cugtest测试任意GLI(计算datFUN)对有条件的均匀图的零假设,通过蒙特卡罗模拟。调理性质的一些变化是可用的,目前仅在大小,调理,调理共同大小和估计领带概率(通过有望密度),和空调的大小(自举)共同实现边沿值分布。需要注意的是相当数量的灵活性是可能的CUG测试功能GLIS(Anderson等,1999)。请参阅下面的更多细节。
用法----------Usage----------
cugtest(dat, FUN, reps=1000, gmode="digraph", cmode="density",
diag=FALSE, g1=1, g2=2, ...)
参数----------Arguments----------
参数:dat
graph(s) to be analyzed.
图()来进行分析。
参数:FUN
function to compute GLIs, or functions thereof. FUN must accept dat and the specified g arguments, and should return a real number.
函数计算GLIS,或者其功能。 FUN必须接受dat和指定的g参数,并应该返回一个实数。
参数:reps
integer indicating the number of draws to use for quantile estimation. Note that, as for all Monte Carlo procedures, convergence is slower for more extreme quantiles. By default, reps==1000.
整数表示即将使用的分位数估计。需要注意的是,所有蒙特卡罗程序,收敛速度较慢更多极端位数的。默认情况下,reps==1000。
参数:gmode
string indicating the type of graph being evaluated. "digraph" indicates that edges should be interpreted as directed; "graph" indicates that edges are undirected. gmode is set to "digraph" by default.
的图表类型的字符串,表示正在评估中。表明边缘应被解释为指示“有向图”,“图形”表明边缘是无向。 gmode设置为默认情况下,“有向图”。
参数:cmode
string indicating the type of conditioning assumed by the null hypothesis. If cmode is set to "density", then the density of the graph in question is used to determine the tie probabilities of the Bernoulli graph draws (which are also conditioned on |V(G)|). Ifcmode=="ties", then draws are bootstrapped from the distribution of edge values within the data matrices. If cmode="order", then draws are uniform over all graphs of the same order (size) as the graphs within the input stack. By default, cmode is set to "density".
空调的类型的字符串所承担的零假设。如果cmode被设置为“密度”,然后使用问题的曲线图中的密度来确定的伯努利图绘制领带概率(也条件| V(G)|)。如果cmode=="ties",然后绘制的自举数据矩阵内的边缘值的分布。如果cmode="order",然后绘制的所有图形相同的顺序(大小),在输入的图形堆栈是统一的。默认情况下,cmode设置为"density"。
参数:diag
boolean indicating whether or not the diagonal should be treated as valid data. Set this true if and only if the data can contain loops. diag is FALSE by default.
布尔值,表示是否对角线应被视为有效的数据。设置这是真的,当且仅当数据可以包含循环。 diag是FALSE默认情况下。
参数:g1
integer indicating the index of the first graph input to the GLI. By default, g1==1.
整数,表示输入的GLI第一张图的索引。默认情况下,g1==1。
参数:g2
integer indicating the index of the second graph input to the GLI. (FUN can ignore this, if one wishes to test the GLI value of a single graph, but it should recognize the argument.) By default, g2==2.
整数,表示第二个图形输入到GLI的索引。 (FUN可以忽略这一点,如果一个人希望测试的的GLI值的一个单一的图形,但它应该认识到的参数。)默认情况下,g2==2。
参数:...
additional arguments to FUN.
附加参数到FUN。
Details
详细信息----------Details----------
The null hypothesis of the CUG test is that the observed GLI (or function thereof) was drawn from a distribution equivalent to that of said GLI evaluated (uniformly) on the space of all graphs conditional on one or more features. The most common “features” used for conditioning purposes are order (size) and density, both of which are known to have strong and nontrivial effects on other GLIs (Anderson et al., 1999) and which are, in many cases, exogenously determined. (Note that maximum entropy distributions conditional on expected statistics are not in general correctly referred to as “conditional uniform graphs”, but have been described as such for independent-dyad models; this is indeed the case for this function, although such terminology is not really proper. See cug.test for CUG tests with exact conditioning.) Since theoretical results regarding functions of arbitrary GLIs on the space of graphs are not available, the standard approach to CUG testing is to approximate the quantiles of the observed statistic associated with the null hypothesis using Monte Carlo methods. This is the technique utilized by cugtest, which takes appropriately conditioned draws from the set of graphs and computes on them the GLI specified in FUN, thereby accumulating an approximation to the true quantiles.
的CUG测试的零假设的是,所观察到的GLI(或函数)被从分布相当于所述GLI评估(均匀)的空间上的所有条件的一个或多个特征的图表绘制。最常见的用于调节所用的“功能”的顺序(大小)和密度,这两者都是已知的其他GLIS(Anderson等人,1999)和有强大和非平凡的影响是,在许多情况下,外源性确定。 (附注的最大熵分布条件预期的统计数据是不一般正确地称为“有条件均匀图”,但被描述为独立对子模型等,这确实是此功能的情况下,虽然这样的术语没有真正正确的。cug.testCUG测试的精确调节。)由于功能的空间图形的任意GLIS的理论成果,标准方法到CUG测试是所观察到的统计位数相关的零假设,采用Monte Carlo方法。这是该技术利用cugtest,采取适当的条件下吸引了来自组曲线图,并计算他们GLI指定的FUN,从而积累了一个近似的真实位数。
The cugtest procedure returns a cugtest object containing the estimated distribution of the test GLI under the null hypothesis, the observed GLI value of the data, and the one-tailed p-values (estimated quantiles) associated with said observation. As usual, the (upper tail) null hypothesis is rejected for significance level alpha if p>=observation is less than alpha (or p<=observation, for the lower tail). Standard caveats regarding the use of null hypothesis testing procedures are relevant here: in particular, bear in mind that a significant result does not necessarily imply that the likelihood ratio of the null model and the alternative hypothesis favors the latter.
cugtest程序返回一个cugtest对象,其中包含的零假设,所观察到的的GLI值的的数据,单尾p值(估计位数的估计分配情况下的测试GLI)与说观察。像往常一样,上尾的零假设被拒绝的显着性水平阿尔法,如果p> =观察不到α(或p <=观察,下尾)。关于使用的空假设检验程序的相关标准注意事项:特别是,要记住,一个显着的结果并不一定意味着空模型的似然比和备择假设有利于后者。
Informative and aesthetically pleasing portrayals of cugtest objects are available via the print.cugtest and summary.cugtest methods. The plot.cugtest method displays the estimated distribution, with a reference line signifying the observed value.
cugtest对象的信息化和美观的写照可以通过print.cugtest和summary.cugtest方法。 plot.cugtest方法显示的估计分配,标志着观测值与参考线。
值----------Value----------
An object of class cugtest, containing
类cugtest,包含的对象
<table summary="R valueblock"> <tr valign="top"><td>testval</td> <td> The observed GLI value. </td></tr> <tr valign="top"><td>dist</td> <td> A vector containing the Monte Carlo draws. </td></tr> <tr valign="top"><td>pgreq</td> <td> The proportion of draws which were greater than or equal to the observed GLI value. </td></tr> <tr valign="top"><td>pleeq</td> <td> The proportion of draws which were less than or equal to the observed GLI value. </td></tr> </table>
<table summary="R valueblock"> <tr valign="top"> <TD> testval</ TD> <TD>所观察到的GLI值。 </ TD> </ TR> <tr valign="top"> <TD> dist</ TD> <td>一个矢量蒙地卡罗平。 </ TD> </ TR> <tr valign="top"> <TD> pgreq</ TD> <TD>均大于或等于观察到的GLI值的比例绘制。 </ TD> </ TR> <tr valign="top"> <TD> pleeq</ TD> <TD>小于或等于观察到的GLI值的比例绘制。 </ TD> </ TR> </ TABLE>
注意----------Note----------
This function currently conditions only on expected statistics, and is somewhat cumbersome. cug.test is now recommended for univariate CUG tests (and will eventually supplant this function).
此功能目前的条件,只有在预期的统计,比较复杂。 cug.test现在建议进行单因素的CUG测试(并最终将取代此功能)。
(作者)----------Author(s)----------
Carter T. Butts <a href="mailto:buttsc@uci.edu">buttsc@uci.edu</a>
参考文献----------References----------
Anderson, B.S.; Butts, C.T.; and Carley, K.M. (1999). “The Interaction of Size and Density with Graph-Level Indices.” Social Networks, 21(3), 239-267.
参见----------See Also----------
cug.test, qaptest, gliop
cug.test,qaptest,gliop
实例----------Examples----------
#Draw two random graphs, with different tie probabilities[绘制两个不同的领带概率随机图,]
dat<-rgraph(20,2,tprob=c(0.2,0.8))
#Is their correlation higher than would be expected, conditioning [是他们的相关性高于预期,空调]
#only on size?[只有在大小?]
cug<-cugtest(dat,gcor,cmode="order")
summary(cug)
#Now, let's try conditioning on density as well.[现在,让我们试着密度以及空调。]
cug<-cugtest(dat,gcor)
summary(cug)
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|