This is a Preprint and has not been peer reviewed. This is version 1 of this Preprint.

okaapi: an R package for generating social networks based on trait preferences
Downloads
Authors
Abstract
Modelling of simulated networks with generative network models plays a central role for our understanding of the emergence and consequences of network structures. Accessible software that generates simulated networks based on relevant processes can facilitate the use of this important approach in behavioural ecology, and can help drive forward our understanding of animal social structures.
Here we present the R package ‘okaapi’. This package can generate simulated networks based on a key driver of real social networks in many species, namely trait preferences (where individuals differentially socialize with others that have certain trait values, such as their sex, age, body size, etc.). The package provides tools for generating, visualising and quantifying trait preference networks. It uses a flexible modelling approach, where many different trait preferences can be modelled, and multiple trait preferences can affect the network simultaneously (as in real networks). It can both generate purely simulated networks, and networks based on trait data from real populations. The package can also be used for modelling networks with other node attribute effects than trait preferences, and may be useful not only for animal social networks, but also human social networks and non-social networks.
This paper provides an introduction to the okaapi package, including information on kinds of studies where the package may be useful, the content of the package, how to use the package, and examples of its use (with R code included). We hope that the okaapi R package will be useful in the field of behavioural ecology and other research areas, and that it will help facilitate the use of generative network modelling in the study of animal social systems and further the integration of this approach with empirical approaches.
DOI
https://doi.org/10.32942/X2CK8X
Subjects
Behavior and Ethology, Ecology and Evolutionary Biology, Physical Sciences and Mathematics, Social and Behavioral Sciences
Keywords
generative network models, network modelling, network simulation, node attributes, social networks, social preferences, R package, trait preferences
Dates
Published: 2025-07-09 08:28
Last Updated: 2025-07-09 08:28
License
CC-BY Attribution-NonCommercial 4.0 International
Additional Metadata
Language:
English
Data and Code Availability Statement:
Code with demonstrations of how to use the package is available (please see the code availability statement in the paper).
There are no comments or no comments have been made public for this article.