Published August 18, 2020 | Version v1
Dataset Open

The performance of permutations and exponential random graph models when analysing animal networks (R code and data)

  • 1. University of Exeter
  • 2. University of Zurich
  • 3. University of Aberdeen


Social network analysis is a suite of approaches for exploring relational data. Two approaches commonly used to analyse animal social network data are permutation-based tests of significance and exponential random graph models. However, the performance of these approaches when analysing different types of network data has not been simultaneously evaluated. Here we test both approaches to determine their performance when analysing a range of biologically realistic simulated animal social networks. We examined the false positive and false negative error rate of an effect of a two-level explanatory variable (e.g. sex) on the number and combined strength of an individual's network connections. We measured error rates for two types of simulated data collection methods in a range of network structures, and with/without a confounding effect and missing observations. Both methods performed consistently well in networks of dyadic interactions, and worse on networks constructed using observations of individuals in groups. Exponential random graph models had a marginally lower rate of false positives than permutations in most cases. Phenotypic assortativity had a large influence on the false positive rate, and a smaller effect on the false negative rate for both methods in all network types. Aspects of within- and between-group network structure influenced error rates, but not to the same extent. In grouping-event based networks, increased sampling effort marginally decreased rates of false negatives, but increased rates of false positives for both analysis methods. These results provide guidelines for biologists analysing and interpreting their own network data using these methods.


Simulation R code is provided in a format where it can be used flexibly as desired by a researcher. Use in a HPC environment will require use of wrapper scripts to run the functions multiple times with different parameter sets.

The plotting code will run with the input data files provided (network plotting requires the parameter set csv and result plotting requires the summarised data csv)



Files (136.2 kB)

Name Size Download all
8.8 kB Download
12.5 kB Download
7.1 kB Download
27.8 kB Download
64.1 kB Preview Download
15.8 kB Preview Download