DOI: 10.5061/dryad.4xgxd259n
title: The evolution of size-dependent competitive interactions promotes species coexistence

description: 1. Theory indicates that competing species coexist in a community when
 intraspecific competition is stronger than interspecific competition. When
 body size determines the outcome of competitive interactions between
 individuals, coexistence depends also on how resource use and the ability
 to compete for these resources change with body size. Testing coexistence
 theory in size-structured communities, therefore, requires disentangling
 the effects of size-dependent competitive abilities and niche shifts. 2.
 Here, we tested the hypothesis that the evolution of species and
 size-dependent competitive asymmetries increased the likelihood of
 coexistence between interacting species. 3. We experimentally estimated
 the effects of size-dependent competitive interactions on somatic growth
 rates of two interacting fish species, Trinidadian guppies (Poecilia
 reticulata) and killifish (Rivulus hartii). We controlled for the effects
 of size-dependent changes in the niche at two competitive settings
 representing the early (allopatric) and late (sympatric) evolutionary
 stages of a killifish-guppy community. We fitted the growth data to a
 model that incorporates species and size-dependent competitive asymmetries
 to test whether changes in the competitive interactions across sizes
 increased the likelihood of species coexistence from allopatry to
 sympatry. 4. We found that guppies are competitively superior to killifish
 but were less so in sympatric populations. The decrease in the effects of
 interspecific competition on the fitness of killifish and increase in the
 interspecific effect on guppies’ fitness increased the likelihood that
 sympatric guppies and killifish will coexist. However, while the
 competitive asymmetries between the species changed consistently between
 allopatry and sympatry between drainages, the magnitude of the
 size-dependent competitive asymmetries varied between drainages. 5. These
 results demonstrate the importance of integrating evolution and
 trait-based interactions into the research on how species coexist.
description: These data were collected from two surface competition
 experiments in the laboratory. 
description: <br> <strong>THE DATA:</strong>
 The data set "Competition_FULL.csv" contains 28
 columns. The columns  "<em>mark, Escape, Flag, Date in, Date
 Died, Date.Rep, Comments</em>" are internal columns that
 contain information about each individual, who mark them, and other
 relevant information for the decisions of using or not using those
 individuals in the analyses. For the analyses, we only use individuals
 where the column: <em>touse</em> == 1
 <em>Further details on the data names and
 meaning:</em> <em>K:</em> dummy
 variable indicating whether the individual is a killifish (1)<br>
 <em>G:</em> dummy variable indicating whether the individual
 is a guppy (1)<br> <em>exp_days: </em>number of days in
 the experiment<br> <em>z: </em>initial standard body
 length in mm<br> <em>zt: </em>initial total body length
 in mm<br> <em>gr: </em>initial mass in grams
 Missing values (<strong>NA</strong>) in the next
 columns are the result of fish dying or escaping. If they died or escaped
 after 25 days of being in the experiment     <br> z1: final standard
 body length in mm.<br> zt1: final total body length in mm   
  <br> gr1: final mass in grams    
 <strong>THE CODE:</strong> You can
 replicate our analyses by either running the "Master_script.R"
 file or running each script found in the "/R/" folder. It is
 important to run them sequentially because each script produces the
 necessary output for the next. For example, script
 "01. Run Stan models.R" processes the data and runs multiple
 growth models that vary in the structure of the interactions surface,
 which are stored in the folder:
 ".../stan_runs/Growth/&lt;experiment&gt;". Then
 "02. Model Comparison.R" uses that output from the
 "stan_runs/" folders to make the model comparison. The reason to
 do it this way was that depending on the computer, it took a lot of time
 to run the models, and it was easier to save the models and then continue
 with the analyses of their output. Inside the
 "R/stan_models" folder, you can find the raw .stan code for each
 model used in the manuscript.  <br> The "IPM
 Results.RData" contains Bassar, Travis, and Coulson 2017 Ecology
 simulations. These are needed for Figure 5.