Skip to main content
Dryad logo

The evolution of size-dependent competitive interactions promotes species coexistence


Anaya-Rojas, Jaime Mauricio et al. (2021), The evolution of size-dependent competitive interactions promotes species coexistence, Dryad, Dataset,


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.


These data were collected from two surface competition experiments in the laboratory. 

Usage Notes


The data set "Competition_FULL.csv" contains 28 columns. The columns  "mark, Escape, Flag, Date in, Date Died, Date.Rep, Comments" 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: touse == 1

Further details on the data names and meaning:

K: dummy variable indicating whether the individual is a killifish (1)
G: dummy variable indicating whether the individual is a guppy (1)
exp_days: number of days in the experiment
z: initial standard body length in mm
zt: initial total body length in mm
gr: initial mass in grams

Missing values (NA) 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     
z1: final standard body length in mm.
zt1: final total body length in mm     
gr1: final mass in grams    


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/<experiment>". 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. 

The "IPM Results.RData" contains Bassar, Travis, and Coulson 2017 Ecology simulations. These are needed for Figure 5.


National Science Foundation, Award: 1556884