Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

cug.test

Univariate Conditional Uniform Graph Tests


Description

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.

Usage

cug.test(dat, FUN, mode = c("digraph", "graph"), cmode = c("size", 
    "edges", "dyad.census"), diag = FALSE, reps = 1000, 
    ignore.eval = TRUE, FUN.args = list())

Arguments

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

graph if dat is an undirected graph, else digraph.

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: TRUE is usually more efficient.)

FUN.args

a list containing any additional arguments to FUN.

Details

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.

Value

An object of class cug.test.

Author(s)

Carter T. Butts buttsc@uci.edu

References

Butts, Carter T. (2008). “Social Networks: A Methodological Introduction.” Asian Journal of Social Psychology, 11(1), 13–41.

See Also

Examples

#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")

sna

Tools for Social Network Analysis

v2.6
GPL (>= 2)
Authors
Carter T. Butts [aut, cre, cph]
Initial release
2020-10-5

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.