Week 3 Challenge Instructions

challenge_3
instructions
Degree and Density of a Network
Author

Oriol Vallès Codina

Published

March 6, 2023

Challenge Overview

Describe the many measures of degree, as well as density, of a network and compare

Degree

If you have not done it before, evaluate the structure of the network (number of edges and vertices, dyad and triad census, etc.).

Compute the many measures of degree of the network of your choice, most preferably directed. Create a data frame called nodes where each row corresponds to a node and each column to an attribute of the node, namely the id, name or label, and different measures of degree: total, out-degree, and in-degree. What is the average degree of the network?

Compute the distributions of those measures (or histograms if your network is small). What does this tell us about the structure of the network?

Density

Compute the density of the network. Is this a global or local measure? Does it have a relationship with average degree?

Random Network

Create a random (Erdos-Renyi) network with the same number of nodes and edges than the network of your choice. On igraph, the necessary commands are random.graph.game(n, p.or.m, type = c("gnp", "gnm"), directed = FALSE, loops = FALSE) (deprecated), sample_gnp(n, p, directed = FALSE, loops = FALSE) or sample_gnm(n, m, directed = FALSE, loops = FALSE). The p.or.m argument is to specify the probability of an edge \(p\) or the number of edges \(m\).

Compare the densities, dyad and triad censuses, and degree distributions, with the measures of the network of your choice. Does the comparison us something about the network of your choice?