gtrans {sna} | R Documentation |
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"), use.adjacency = TRUE)
dat |
a collection of input graphs. |
g |
a vector indicating the graphs which are to be analyzed; by default, all graphs are analyzed. |
diag |
a boolean indicating whether or not diagonal entries (loops) are to be taken as valid data. |
mode |
|
measure |
one of |
use.adjacency |
logical; should adjacency matrices (versus sparse graph methods) be used in the transitivity computation? |
Transitivity is a triadic, algebraic structural constraint. In its weak form, the transitive constraint corresponds to a->b->c => a->c. In the corresponding strong form, the constraint is a->b->c <=> a->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 the default method used here employs matrix multiplication to calculate transitivity scores. For very large, sparse graphs, the sparse graph method (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).
A vector of transitivity scores
Carter T. Butts buttsc@uci.edu
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.
#Draw some random graphs g<-rgraph(5,10) #Find transitivity scores gtrans(g)