DOI: 10.5061/dryad.zw3r228gw
title: Effects of phylogenetic distance, niche overlap and habitat alteration on spatial co-occurrence patterns in Neotropical bats and birds

description: Ecological interactions influence species distributions and provide
 crucial ecosystem services such as pollination, seed dispersal, and pest
 control. Human alteration of habitats can modify these interactions, but
 quantifying such modifications is challenging, especially at larger
 spatial scales. Here we assessed the potential impacts of habitat
 disturbance on food competition among Neotropical bats and birds. We did
 so by first quantifying spatial and phylogenetic trends in co-occurrence
 frequencies for species pairs in relation to dietary overlap using a novel
 statistical approach, and then assessing how these trends differed between
 assemblages in relatively intact and human-altered habitats. For both the
 bat and bird assemblages, co-occurrence frequencies for species pairs were
 significantly higher than expected by chance, consistent with habitat
 filtering, and increased with phylogenetic relatedness, consistent with
 phylogenetic niche conservatism. After controlling for phylogeny,
 co-occurrence frequencies for birds were on average lower in intact than
 altered habitats, contrary to expectations. For both bats and birds,
 variance in co-occurrence frequencies was significantly lower in altered
 habitats, perhaps reflecting declines in habitat complexity. Overall, our
 findings indicate that habitat alteration by humans can profoundly affect
 how biological interactions play out at landscape to regional scales.
description: [https://doi.org/10.5061/dryad.zw3r228gw](https://doi.org/10.5061/dryad.zw3r228gw) # **Effects of phylogenetic distance, niche overlap and habitat alteration on spatial co-occurrence patterns in Neotropical bats and birds.**  By Aniko B. Toth, John Alroy, S Kathleen Lyons, and Andrew P. Allen Submitted 15 July 2024 ## Description of the data and file structure This data consists of eight text files, four containing data for bats, and four for birds.  **[taxon]_samples.txt** : a file containing site metadata including reference number.     *reference no*- ID number of the source of the record in the Ecological Register     *sample no*- ID number of the sample containing the record in the Ecological Register     *contributor*- person who contributed the reference     *enterer*- person who entered the data into the Ecological Register     *created*- date the data was entered in the Ecological Register     *sample name*- name of the site where the sample was taken     *country*- country where the sample was collected     *state*- state where the sample was collected     *ecozone*- name of the ecozone of the sample, restricted to "Neotropic" in this dataset.      *region*- name of the continent or subcontinent where the sample was collected     *latitude, longitude*- coordinates of the sample location in degrees; rounded to the nearest tenth of a degree to protect near threatened and vulnerable species, with a few sites rounded to the nearest degree.      *habitat*- description of the habitat type, categorical variable     *altered habitat*- a description of level/type of disturbance in the sample location, categorical. If empty, this means that the habitat was not altered in any permanent way.      *nets or traps-* the number of nets or traps set out during the sampling procedure, a measure of sampling effort     *net or trap nights-* the number of days/nights during which sampling apparatus were deployed, a measure of sampling effort     *individuals-* the total number of individuals captured at the sample location, a measure of sampling completeness.      *richness-* the total number of distinct species found at the site.      *singletons-* the total number of species represented by a single individual at that site, a measure of sampling completeness.  **[taxon]_species.txt**: a file containing species metadata     *species-* the latin/scientific name of the species     *life form-* the type of organism sampled, in this case either bats or birds.     *individuals-* the number of times the species was recorded in this dataset     *IUCN status-* the threat level of the species in on the IUCN Red List of threatened species, if known.    * mass (g)-* the mass of the species in grams    * mass N-* the sample size on which the mass of the species is based     *mass source-* indicates whether the species mass was measured directly or whether it was derived from measurements from its genus, in cases where no individuals were measured directly.      *diet1-* the primary dietary guild of the species (categorical)     *diet2-* the secondary dietary guild of the species, if applicable (categorical)     *diet source-* indicates whether the species diet was observed directly or extrapolated from the diets of its congeneric sister species, as this is often a strongly conserved trait.  **[taxon]_register.txt**: a file containing the observed species by site occurrence data in long format, including some site and species metadata     *reference no*- ID number of the source of the record in the Ecological Register     *sample no*- ID number of the sample containing the record in the Ecological Register     *contributor*- person who contributed the reference     *enterer*- person who entered the data into the Ecological Register     *created*- date the data was entered in the Ecological Register     *sample name*- name of the site where the sample was taken     *habitat*- description of the habitat type, categorical variable     *altered habitat*- a description of level/type of disturbance in the sample location, categorical. If empty, this means that the habitat was not altered in any permanent way.      *life form*- the type of organism sampled, in this case either bats or birds.     *genus*, *qualifier, species*- standard classification, i.e., the latin name components of the species.      *count*- the abundance of the species in the present dataset.       **[taxon]_references**: a file containing the references from which the data was extracted.     *reference no*- ID number of the source in the Ecological Register     *contributor*- person who contributed the reference     *enterer*- person who entered the data into the Ecological Register     *created*- date the data was entered in the Ecological Register     *authors, year, title, editors, volume, number, firstpage, lastpage*- standard article referencing details     *source*- the name of the journal or publisher    *source* *type*- the type of data source    *language*- language in which the article was originally published    *DOI*- DOI of the data source    *sampled entered*- note about the quantity of samples in the source which were deemed appropriate to be included in the Ecological Register.  ## Sharing/Access information Links to other publicly accessible locations of the data: * Bird data Published in previous work: [https://onlinelibrary.wiley.com/doi/abs/10.1111/ele.13152](https://onlinelibrary.wiley.com/doi/abs/10.1111/ele.13152) * Bat data on Dryad: Alroy, John (2019). Data from: Latitudinal gradients in the ecology of New World bats [Dataset]. Dryad. [https://doi.org/10.5061/dryad.3p3v816](https://doi.org/10.5061/dryad.3p3v816) Data was derived from the following sources: * Download from Ecological Register ([www.ecoregister.org](http://www.ecoregister.org)) ## Code/Software Analysis_script.R : Runs the entire analysis and calls all other scripts as needed.  Helper_Functions.R : Contains all helper functions Data_Prep.R : Takes raw data files and prepares them for analysis, including downloading taxonomy from the open tree of life and generating phylogenetic distances. brms_fxns.R : Contains code and functions used in fitting brms models ## Instructions for using code  Instructions  1. Create a working directory. 2. In your working directory, create the following folders: *  Raw_Data (place raw data files from Dryad in here) * Code (place script files from Dryad/Zenodo in here) * Results (leave empty) - best models and output tables will be saved here. * stan (leave empty) - intermediate products from modelling saved here, you should not need them. 3. Run Analysis_Script.R. This will call other scripts as necessary. Please note large computing requirements.  4. If Figures are desired, run Figures.R.