DOI: 10.5061/dryad.ttdz08m80
title: Social environment and the evolution of delayed reproduction in birds

description: One puzzling feature of avian life histories is that individuals in many
 different lineages delay reproduction for several years after they finish
 growing. Intraspecific field studies suggest that various complex social
 environments—such as cooperative breeding groups, nesting colonies, and
 display leks—result in delayed reproduction because they require forms of
 sociosexual development that extend beyond physical maturation. Here, we
 formally propose this hypothesis and use a full suite of phylogenetic
 comparative methods to test it, analyzing the evolution of age at first
 reproduction (AFR) in females and males across 963 species of birds.
 Phylogenetic regressions support increased AFR in colonial females and
 males, cooperatively breeding males, and lekking males. Continuous
 Ornstein-Uhlenbeck models support distinct evolutionary regimes with
 increased AFR for all of the cooperative, colonial, and lekking lineages.
 Discrete hidden state Markov models suggest a net increase in delayed
 reproduction for social lineages, even when accounting for hidden state
 heterogeneity and the potential reverse influence of AFR on sociality. Our
 results support the hypothesis that the evolution of social environments
 reshapes the dynamics of life history evolution in birds. Comparative
 analyses of even the most broadly generalizable characters, such as AFR,
 must reckon with unique, heterogeneous, historical events in the evolution
 of individual lineages.
description: Secondary data collection from encyclopedia references,
 supplemented by additional published reports on target families or
 species. See the main data file for individual species references and
 source text quotations.
description: # Social environment and the evolution of delayed reproduction in birds
 https://doi.org/10.5061/dryad.ttdz08m80 --- This repository contains the
 data (**data_clean.tsv**) and analysis files needed to replicate the
 analyses in our manuscript.  NOTE - The original version of the dataset
 includes full source quotation information and explanations of how every
 AFR value is derived from available information. These raw quotations
 cannot be provided in this repository due to copyright restrictions.
 Contact L. U. Taylor for a version of the dataset with all quotations. ##
 Data file descriptions ### data_clean.tsv * *Index_Clements*: (int)
 Taxonomic index from the Clements v2023b Taxonomy * *Avibase_ID*: (chr)
 AviBase ID associated with this taxon in the Clements v2023b Taxonomy *
 *Order_Clements*: (chr) Taxonomic Order from the Clements v2023b Taxonomy
 * *Family_Clements*: (chr) Taxonomic Family from the Clements v2023b
 Taxonomy * *Taxon_Clements*: (chr) Genus and species binomial from the
 Clements v2023b Taxonomy * *Common_Clements*: (chr) Common English name
 from the Clements v2023b Taxonomy * *Colony*: (bool) Is the taxon
 colony-nesting? (1=yes, 0=no) * *Lek*: (bool) Is the taxon cooperative
 breeding? (1=yes, 0=no) * *Parental_Care*: (chr) Parent care code from
 Cockburn 2006 [! indicates revisions from that dataset] *
 *Social_Context*: (chr) Final social category for analysis (Colony,
 Cooperative, Lek, Other) * *Mass*: (chr) Mass (g) from the AVONET dataset.
 * *Min_AFR_F*: (int) Minimum reported age at first reproduction (yr),
 females * *Min_AFR_Log_F*: (dbl) Minimum reported age at first
 reproduction (log2 yr), females * *Min_AFR_M*: (int) Minimum reported age
 at first reproduction (yr), males * *Min_AFR_Log_M*: (dbl) Minimum
 reported age at first reproduction (log2 yr), males * *Min_AFR_Diff*:
 (int) Difference between ages at first reproduction, males - females (yr)
 * *Source_AFR*: (chr) Source for age at first reproduction data. * BOW =
 Cornell's Birds of the World * BWP = The Birds of the Western
 Palearctic * HANZAB = Handbook of Australian, New Zealand, and Antarctic
 Birds * BA = The Birds of Africa * BA(M) = The Birds of Africa
 (Madagascar) * Other references given with full citation information *
 *Tip_Label*: (chr) Underscore-delimited Genus_species name for matching
 with tree labels ## Running the code First, create a Data/directory. Add
 the following files. 1. data_clean.tsv 2. dated_rand_sample_clements.tre
 (download from [McTavish et al.
 2024](https://github.com/McTavishLab/AvesData/commit/1dcd8be23491dce4c8f875699ef6ba203cf54a96)) 3. tree_images.r (information for drawing [PhyloPic](https://www.phylopic.org/) images on the tree figures) Next, create a Scripts/ directory. Add all .sh and .r files: 1. 1_wrangle_data.sh (wrangles the main data file to a clean version for analyses). NOTE: This script was already run to produce the data_clean.tsv file provided in this repository. A raw, unformatted Excel file is not provided. 2. 2_rrppanova.sh (RRPP ANOVA with Brownian covariance structures) 3. 3_pgls.sh (phylogenetic generalized least squares models in nlme) 4. 4_ou_models.sh (continuous evolutionary models in OUwie) 5. 5-1_corhmm_F.sh and 5-2_corhmm_M.sh (discrete evolutionary models in corHMM, for parallel Female and M dataset runs) 6. 6_tables_and_figures.sh (generates MS tables and figures; requires all results from Scripts 1-5) Running the bash scripts in order will reproduce the analyses in the manuscript. ### Software requirements Scripts are written for Unix bash (Ubuntu) and R v4.4.1. See scripts and manuscript for packages and software citations. Bash scripts were originally run with Yale HPC resources ([McClearly cluster](https://docs.ycrc.yale.edu/clusters/mccleary/)) and Bowdoin HPC resources using [slurm](https://slurm.schedmd.com/documentation.html) and [Dead Simple Queue](https://github.com/ycrc/dSQ/tree/master). Required R packages can be installed in R with: ```R install.packages(c("tidyverse", "readxl", "ape", "furrr", "OUwie", "progressr", "corHMM", "RRPP", "nlme", "broom.mixed", "ggtree", "ggtreeExtra", "scales", "patchwork")) ```