| cug.test | R Documentation |
cug.test takes an input network and conducts a conditional uniform graph (CUG) test of the statistic in FUN, using the conditioning statistics in cmode. The resulting test object has custom print and plot methods.
cug.test(dat, FUN, mode = c("digraph", "graph"), cmode = c("size",
"edges", "dyad.census"), diag = FALSE, reps = 1000,
ignore.eval = TRUE, FUN.args = list())
dat |
one or more input graphs. |
FUN |
the function generating the test statistic; note that this must take a graph as its first argument, and return a single numerical value. |
mode |
|
cmode |
string indicating the type of conditioning to be applied. |
diag |
logical; should self-ties be treated as valid data? |
reps |
number of Monte Carlo replications to use. |
ignore.eval |
logical; should edge values be ignored? (Note: |
FUN.args |
a list containing any additional arguments to |
cug.test is an improved version of cugtest, for use only with univariate CUG hypotheses. Depending on cmode, conditioning on the realized size, edge count (or exact edge value distribution), or dyad census (or dyad value distribution) can be selected. Edges are treated as unvalued unless ignore.eval=FALSE; since the latter setting is less efficient for sparse graphs, it should be used only when necessary.
A brief summary of the theory and goals of conditional uniform graph testing can be found in the reference below. See also cugtest for a somewhat informal description.
An object of class cug.test.
Carter T. Butts buttsc@uci.edu
Butts, Carter T. (2008). “Social Networks: A Methodological Introduction.” Asian Journal of Social Psychology, 11(1), 13–41.
cugtest
#Draw a highly reciprocal network
g<-rguman(1,15,mut=0.25,asym=0.05,null=0.7)
#Test transitivity against size, density, and the dyad census
cug.test(g,gtrans,cmode="size")
cug.test(g,gtrans,cmode="edges")
cug.test(g,gtrans,cmode="dyad.census")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.