11.2 The Dyad

  • large social networks can be broken down into their constituent parts called “motifs”.
  • The most basic motif consists of only two nodes and is called a dyad.
  • A dyad can have different configurations based on the graph type :
    • Undirected: connected or disconnected.
    • Directed: mutual, assymetric, and null.

Transitivity:

  • Number of existing triplets (triangles x 3) divided by all possible triplets.

  • A measure of the tendency of the nodes to cluster together.

  • “A friend of a friend is a friend”

  • related to clustering coefficient and modularity

Since edges in a network signify the presence or absence of dyadic relations, we can think of network density as a measure of the proportion of present dyads over the number of all possible dyads.

graph.density(net59)
## [1] 0.004380561
  • In directed graphs, an edge is reciprocal when ego and alter send each other ties.
  • Reciprocity is measures the tendency for edges to be reciprocal across the whole network.
reciprocity(net59)
## [1] 0.39375

3- Generating a random graph for comparison - Random graph is characterized by chance of a tie is determined by chance and independent from one another. - Random graph can be used as a null model to test our data.

In an erdos.renyi.graph, each edge has the same probability of being created

#igraph has a fast and easy function for generating random graphs.
?erdos.renyi.game

Let’s calculate the density and number of nodes in our graph.

net59_n <- vcount(net59)
net59_density <- graph.density(net59)

Then use them as parameters to generate a random graph

random_graph <- erdos.renyi.game(n = net59_n,# n is the number of nodes
                                 p.or.m = net59_density,#probability of drawing an edge
                                 directed = TRUE) # whether the network is directed or not
plot(random_graph,  
     vertex.size = 2, 
     vertex.label = NA, 
     edge.curved = .1, 
     vertex.color = "tomato", 
     edge.arrow.size = .1, 
     edge.width = .5, 
     edge.color = "grey60")

Let’s compare the reciprocity of the random graph to our graph

reciprocity(random_graph)
## [1] 0.00145173
reciprocity(net59)
## [1] 0.39375