A dyad is defined as any pair of nodes (A, B). In a directed network, a dyad is said to have a reciprocal relationship if there exists an edge from A to B and from B to A. The reciprocity of any given node N is the ratio of reciprocal relationships N is in to the total number of dyads with any kind of relationship (reciprocal or otherwise).
A dyad is defined as any pair of actors (nodes) (A, B). In a directed network there are three possible kinds of dyads, no tie (link), one likes the other but not vice versa (AB or BA exists, but not both), or both like the other (AB and BA exist). The last one corresponds to a reciprocal relation and a reciprocated tie.
The prevalence of reciprocity is given by the ratio of number of dyads with a reciprocated tie to the total number of dyads with any tie.
Algorithm must be applied to directed networks. Self-loops are ignored in the calculation.
Hanneman, Robert A. and Mark Riddle. 2005. Introduction to social network methods. Riverside, CA: University of California, Riverside.