gtrans
returns the transitivity of the elements of dat
selected by g
, using the definition of measure
. Triads involving missing values are omitted from the analysis.
gtrans(dat, g=NULL, diag=FALSE, mode="digraph", measure = c("weak",
"strong", "weakcensus", "strongcensus", "rank", "correlation"),
use.adjacency = TRUE)
A vector of transitivity scores
a collection of input graphs.
a vector indicating the graphs which are to be analyzed; by default, all graphs are analyzed.
a boolean indicating whether or not diagonal entries (loops) are to be taken as valid data.
"digraph"
if directed triads are sought, or else "graph"
.
one of "weak"
(default), "strong"
, "weakcensus"
, "strongcensus"
, "rank"
, or "correlation"
.
logical; should adjacency matrices (versus sparse graph methods) be used in the transitivity computation?
Carter T. Butts buttsc@uci.edu
Transitivity is a triadic, algebraic structural constraint. In its weak form, the transitive constraint corresponds to \(a \rightarrow b \rightarrow c \Rightarrow a \rightarrow c\). In the corresponding strong form, the constraint is \(a \rightarrow b \rightarrow c \Leftrightarrow a \rightarrow c\). (Note that the weak form is that most commonly employed.) Where measure=="weak"
, the fraction of potentially intransitive triads obeying the weak condition is returned. With the measure=="weakcensus"
setting, by contrast, the total number of transitive triads is computed. The strong
versions of the measures are similar to the above, save in that the set of all triads is considered (since all are ``at risk'' for intransitivity).
Note that where missing values prevent the assessment of whether a triple is transitive, that triple is omitted.
Generalizations of transitivity to valued graphs are numerous. The above strong and weak forms ignore edge values, treating any non-zero edge as present. Two additional notions of transitivity are also supported valued data. The "rank"
condition treads an \((i, j, k)\) triple as transitive if the value of the \((i,k)\) directed dyad is greater than or equal to the minimum of the values of the \((i,j)\) and \((j,k)\) dyads. The "correlation"
option implements the correlation transitivity of David Dekker, which is defined as the matrix correlation of the valued adjacency matrix \(A\) with its second power (i.e., \(A^2\)), omitting diagonal entries where inapplicable.
Note that the base forms of transitivity can be calculated using either matrix multiplication or sparse graph methods. For very large, sparse graphs, the sparse graph method (which can be forced by use.adjacency=FALSE
) may be preferred. The latter provides much better scaling, but is significantly slower for networks of typical size due to the overhead involved (and R's highly optimized matrix operations). Where use.adjacency
is set to TRUE
, gtrans
will attempt some simple heuristics to determine if the edgelist method should be used instead (and will do so if indicated). These heuristics depend on recognition of the input data type, and hence may behave slightly differently depending on the form in which dat
is given. Note that the rank measure can at present be calculated only via sparse graph methods, and the correlation measure only by adjacency matrices. For these measures, the use.adjacency
argument is ignored.
Holland, P.W., and Leinhardt, S. (1972). ``Some Evidence on the Transitivity of Positive Interpersonal Sentiment.'' American Journal of Sociology, 72, 1205-1209.
Wasserman, S., and Faust, K. (1994). Social Network Analysis: Methods and Applications. Cambridge: Cambridge University Press.
triad.classify
, cugtest
#Draw some random graphs
g<-rgraph(5,10)
#Find transitivity scores
gtrans(g)
Run the code above in your browser using DataLab