Skip to main content
okaapi: an R package for generating social networks based on trait preferences

okaapi: an R package for generating social networks based on trait preferences

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

Add a Comment

You must log in to post a comment.


Comments

There are no comments or no comments have been made public for this article.

Downloads

Download Preprint

Authors

Josefine Bohr Brask, Lauren J. N. Brent, Delphine De Moor

Abstract

The study of simulated networks plays a central role for our understanding of the emergence and consequences of network structures. Accessible software to create simulated networks based on relevant processes can facilitate the use of this important approach in behavioural ecology, and drive forward our understanding of animal social structures.



Here we present the R package ‘okaapi’. This package can create simulated networks based on a key driver of real social networks, namely trait preferences:behaviour where individuals differentially socialize with others that have certain trait values, such as old age or the same sex as oneself.



The okaapi 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 effects than trait preferences, and may be useful not only for research in animal social networks, but also human social networks and non-social networks.



This paper provides an introduction to the okaapi package, including information on the kinds of studies where it may be useful, its framework and functionality, its content, and examples of its use (with accompanying R code).



We hope that the okaapi 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 09:28

Last Updated: 2026-07-17 12:55

Older Versions

License

CC-BY Attribution-NonCommercial 4.0 International

Additional Metadata

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).

Language:
English

Metrics

Views: 1443

Downloads: 311