DOI: 10.5061/dryad.g79cnp5wk
title: Data from: Social stability via management of natal males in captive rhesus macaques (Macaca mulatta)

description: Keystone individuals are expected to disproportionately contribute to
 group stability. For instance, rhesus macaques (Macaca mulatta) who police
 conflict contribute towards stability. Not all individuals’ motivations
 align with mechanisms of group stability. In wild systems, males typically
 disperse at maturity and attempt to ascend via contest competition. In a
 captive system, dispersal is not naturally enabled – individuals attempt
 to ascend in their natal groups, which can be enabled by matrilineal kin
 potentially destabilizing group dynamics. We relocated select high-ranking
 natal males from five groups and assessed group stability before and
 after. We quantified hierarchical metrics at the individual and group
 level. After removal, we found significantly higher aggression against the
 established hierarchy (reversals), indicative of opportunistic attempts to
 change the hierarchy. Mixed-sex social signaling became more hierarchical,
 but the strength of this effect varied. Stable structure was not uniformly
 reached across the groups and alpha males did not all benefit.
 Indiscriminate natal male removal is an unreliable solution to group
 instability. Careful assessment of how natal males are embedded within
 their group is necessary to balance individual and group welfare.
description: These data are primarily social networks of five groups, observed
 for 12 weeks. Observation periods were divided into: 6-week baseline and
 6-week post-removal, with the natal male removal event occurring early in
 week 7. Agonistic data were collected using event sampling; affiliative
 data were collected using scan sampling.
description: # Social stability via management of natal males in captive rhesus
 macaques Macaca mulatta Alexander J. Pritchard **a, c** Brianne A. Beisner
 **b** Amy Nathman **a** Brenda McCowan **a**, **c** a: California National
 Primate Research Center, University of California Davis, Davis, CA, USA;
 b: Emory National Primate Research Center Field Station, Division of
 Animal Resources, Emory University, Lawrenceville, GA, USA; c: Department
 of Population Health & Reproduction, School of Veterinary Medicine,
 University of California Davis, Davis, CA, USA **Article**
 **Data Dryad
 repository** ##
 Description of the data and file structure Data are contained in the
 NMKO_Data_List.Rdata file. This can be read into R and preprocessed using
 Run-This-First_NMKO_Extract-Dataframes.R and will assemble 26 R objects.
 These objects are as follows: Alf_NM_Codes = a dataframe with columns, in
 order, identifying the groups with a code, the alpha male ID (alfID) and
 the removed natal males' ID (nmID) for each of the groups.
 NMKO_Conflict = a dataframe of all of the conflict reversals that go
 against the hierarchy during baseline and PKO. With columns, in order,
 showing: group code, subject ID, project period (baseline or
 perturbation), count of initiations of reversal conflicts, days of
 observation, rates of conflict reversals, ordinal rank as a proportion
 (RankProp), 'YOB' for year of birth, and 'Age' in
 years. The remaining 24 R objects are lists of five weighted edgelists
 with each embedded dataframe representing each of the five groups with
 Recipient and Initiator, as well as count of each behavior during Baseline
 and PKO (Treatment). Lists are named with the group identifier (A-E).
 Lists are also labelled by a code that represents what each list contains,
 with BEHAVIOR_Period_Sex. Possible combinations include one of four
 behavior types ('SBT' for silent-bared-teeth, 'Grm'
 for Grooming, 'Disp' for displacements, 'DAG' for
 directed aggression), across the two periods ('Base' for
 Baseline; PKO for Post-knockout Perturbation), and three different sex
 combinations ('ALL' for all adult males and females,
 "F" for females-only, "M" for males-only).
 NMKO_Comparing_Metrics.csv is a result file comparing our group-level
 hierarchical metrics. Columns include, in order, group identifier (A-E),
 project Period ('Baseline' for Baseline; PKO for Post-knockout
 Perturbation), three different sex combinations under Net ('ALL'
 for all adult males and females, "F" for females-only,
 "M" for males-only), Metrics of hierarchical structure
 ('Prop' for proportion of nodes in cyclic interactions,
 'ttri' a metric of triangle transitivity, 'h' is the
 h' index for linearity of the hierarchical structure, 'GRC'
 is the Global Reach Centrality metric). ## Code/Software You will need R
 for most of this code, and the following packages: igraph, sna, EloRating,
 tidyr, ggpubr, brms, bayesplot, ggplot2 In Python, you will need:
 Networkx, pandas, and base functions (csv, and random). After importing
 the data into R using the Run-This-First... file, users can run several
 analyses: Analysis_NMKO_NM-vs-Alf-Jaccard.R executes code to extract the
 Jaccard similarity between grooming, displacement, and directed aggression
 ego-networks for the alpha and natal males.
 Analysis_NMKO_Authority-Prop-ttri-h-getGRC.R executes code to extract
 authority scores for the alpha and natal males based on displacement
 networks for male-only and mixed-sex groupings. Group-level metrics are
 also calculated for displacement networks, including: proportion of nodes
 in cycles, h' index, triangle transitivity, and then data are
 exported for use in Python to calculate global reach centrality (GRC - see
 below). Analysis_NMKO_Reversals-Model.R includes code to execute a
 Bayesian Regression Model using Stan for the assessing whether the
 initiation and count of reversals increased during treatment, relative to
 baseline. NMKO_GRC_and_Permutation.txt includes Python code to extract and
 permute GRC values from the displacement and pSBT networks. Executing this
 will create multiple csv files that will be read into the following file.
 Plots_NMKO_Comparing-Hierarchy-Metrics.R will make plots based on the
 above output. For user convenience, we have included our output in the
 file: NMKO_Comparing_Metrics.csv. We have included Permutation .csv output
 files as a zip (Permutation_NMKO_Results.zip). Users can replicate these
 output by executing all the above code, but will need to manually add the
 GRC values to the output csv from
 Analysis_NMKO_Authority-Prop-ttri-h-getGRC.R