# Mating systems and evolutionary rescue The dataset is from simulation modelling of diverse mating systems with varying direction of mate choice and their influence on adaptation rates, heterozygosity, resilience and the likelihood of evolutionary rescue under deteriorating environment. The code for the model and for running the model and visualising the results are archived. The simulation output is also archived. # Two data files were generated to produce the figures for the main figures and the supplemenatry materials **heterozygosityₙochangefig1. xlsx** includes the simulation output generated to plot mean heterozygosity accross replicates and over time for 1000 generations under stable environment for all mating systems (figure 1) **extinctionₑnvchange. rds** contains the data for all mating systems under varying carrying capacities, mismatch penalties, homozygosity penalties and rates of directional change1) to calculate resilience (figure 3) i. e. which of the replicate populations went extinct under different combination of parameters2) data for population size dynamics and median population mismatch and heterozygosity at every time step (figure S1, S2) 3) data for time at which the replicate populations went extinct if they went extinct (figure S3) BOTH DATASETS HAVE THE FOLLOWING VARIABLES *matingₜype* Mating system and direction of mate choice*extinct* binary variable, whether the population became extinct (1 = extinct, 0=persists) *extinction. t* timestep at which extinction takes place *matingₛystem* monogamy or polygyny*parentalcare* bi-parental mismatch & heterozygosity estimating the number of offspring if TRUE (mutual choice monogamy). Only female mismatch & heterozygosity if FALSE *beta. m* male preference strength likelihood to choose the best female in the group *beta. f* female preference strength likelihood to choose the best male in the group*cost. m* cost of the sexual signal trait in males *cost. f* cost of the sexual signal trait in females *alpha. m* how strongly environment scales with sexual trait in males*alpha. f* how strongly environment scales with sexual trait in males*directional. rate* strength of directional environmental change - mean change per timestep, if zero then more or less stable environment *mismatch. penalty* scaling factor for penalizing high mismatch*inbreeding. penalty* scaling factor for penalizing low heterozygosity Columns of below mentioned data for each timestep*pop_* population size*males_* no. of males*females_* no. of females*meanₕeterozygosity_* mean population heterozygosity*medianₕeterozygosity_* median population heterozygosity*effₚop_* effective population size*env_* environmental value*meanₚhenotype_* mean population phenotypic trait value or adaptive value*medianₚhenotype_* median population phenotypic trait value or adaptive value Additionally, **heterozygosityₙochangefig1. xlsx** contains**rep** replicate number Two R scripts are included: **Matingₛystemₘodel. R** this is the code for the model itself. **MSSₛimrunsₐndₐnalysis. R** this script has code for running the simulations and for visualizing the data. Both scripts were developed and run in R 4. 5. 2
Porwal et al. (Thu,) studied this question.