Abstract
The interaction between animals and the development of social relationships are central to animal ecology and evolutionary biology. Social Network Analysis (SNA) is an ideal tool for these studies, yet researchers often struggle with fragmented software. The Animal Network Toolkit Software (ANTs) R package provides a comprehensive, high-performance environment for animal SNA. It enables users to compute global, polyadic, and nodal measures; perform data stream and network permutations; and carry out statistical tests for static or temporal analyses. ANTs facilitates multilevel network analysis without the need to switch between multiple R packages, significantly advancing the study of animal behavior with superior computation speeds.
Introduction: Addressing the Fragmentation in SNA
Social Network Analysis is a powerful tool for understanding animal ecology, but the software landscape has historically been fragmented. Researchers have typically had to choose between specialized GUI software like SOCPROG—which is tailored for animal behavior but lacks programming flexibility—and generalist R packages like igraph or sna, which do not natively handle behavioral data collection biases (like focal sampling) or the specific permuted statistical tests required for non-independent social data.
This fragmentation forces researchers to switch between multiple platforms, increasing the risk of data formatting errors and making complex temporal or multilevel analyses unnecessarily difficult. The ANTs package was developed to bridge this gap, offering a "one-stop-shop" for raw data processing, multilevel permutations, and advanced statistical modeling.
Methods: A Unified Analytical Workflow
ANTs introduces a unified workflow that handles data at three organizational levels: Nodal (individual centrality), Polyadic (interaction patterns between pairs), and Global (overall network structure).
The package implements two primary permutation families to create null models:
- Data Stream Permutations: Randomizing observations before the network is built to control for spatial or temporal biases.
- Node/Link Permutations: Randomizing the resulting network labels.
Crucially, ANTs includes a stat family of functions (e.g., stat.glmm, stat.cor) specifically designed to run on permuted data, providing posterior distributions and permuted p-values. It also includes robustness testing via bootstrapping and observation-deletion simulations to ensure dataset stability.
Key Features and Results
The most significant contribution of ANTs is its "all-in-one" philosophy, which reduces tool-switching and improves reproducibility. The package is optimized for speed, outperforming existing alternatives in calculating network measures and running permutations—a critical advantage when 10,000+ iterations are required.
Key technical highlights include:
- Time Heterogeneity Control: Indices like the Generalized Affiliation Index account for the fact that not all animals are observed for the same amount of time.
- Multilevel Integration: Users can easily analyze how individual attributes (e.g., age, sex) impact global network properties (e.g., density, efficiency) without manual data merging.
- Advanced Visualization: Integration of layouts like Force Atlas 2 and Barnes Hut repulsion allows for high-quality, publication-ready network visualizations directly from analysis objects.
Limitations and Future Directions
While ANTs efficiently handles networks up to 1,000 nodes, extremely large colonies (e.g., thousands of individuals) may still face computational bottlenecks. The authors view ANTs as a collaborative, upgradeable project and invite the community to implement new indices and analytical perspectives as the field of SNA continues to evolve.
Summary updated