Learn R Programming

sna (version 2.4)

grecip: Compute the Reciprocity of an Input Graph or Graph Stack

Description

grecip calculates the dyadic reciprocity of the elements of dat selected by g.

Usage

grecip(dat, g = NULL, measure = c("dyadic", "dyadic.nonnull",
    "edgewise", "edgewise.lrr", "correlation"))

Arguments

dat

one or more input graphs.

g

a vector indicating which graphs to evaluate (optional).

measure

one of "dyadic" (default), "dyadic.nonnull", "edgewise", "edgewise.lrr", or "correlation".

Value

The graph reciprocity value(s)

Details

The dyadic reciprocity of a graph is the proportion of dyads which are symmetric; this is computed and returned by grecip for the graphs indicated. (dyadic.nonnull returns the ratio of mutuals to non-null dyads.) Note that the dyadic reciprocity is distinct from the edgewise or tie reciprocity, which is the proportion of edges which are reciprocated. This latter form may be obtained by setting measure="edgewise". Setting measure="edgewise.lrr" returns the log of the ratio of the edgewise reciprocity to the density; this is measure (called \(r_4\) by Butts (2008)) can be interpreted as the relative log-odds of an edge given a reciprocation, versus the baseline probability of an edge. Finally, measure="correlation" returns the correlation between within-dyad edge values, where this is defined by $$\frac{2\sum_{\{i,j\}} (Y_{ij}-\mu_G)(Y_{ji}-\mu_G)}{(2N_d-1) \sigma^2_G}$$ with \(Y\) being the graph adjacency matrix, \(\mu_G\) being the mean non-loop edge value, \(\sigma^2_G\) being the variance of non-loop edge values, and \(N_d\) being the number of dyads. (Note that this quantity is unaffected by dyad orientation.) The correlation measure may be interpreted as the net tendency for edges of similar relative value (with respect to the mean edge value) to occur within the same dyads. For dichotomous data, adjacencies are interpreted as having values of 0 (no edge present) or 1 (edge present), but edge values are used where supplied. In cases where all edge values are identical (e.g., the complete or empty graph), the correlation reciprocity is taken to be 1 by definition.

Note that grecip calculates values based on non-missing data; dyads containing missing data are removed from consideration when calculating reciprocity scores (except for the correlation measure, which uses non-missing edges within missing dyads when calculating the graph mean and variance).

References

Wasserman, S., and Faust, K. (1994). Social Network Analysis: Methods and Applications. Cambridge: Cambridge University Press.

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

See Also

mutuality, symmetrize

Examples

Run this code
# NOT RUN {
#Calculate the dyadic reciprocity scores for some random graphs
grecip(rgraph(10,5))
# }

Run the code above in your browser using DataLab