ben18785 / Selection_simulations

Simulating Wright-Fisher, Moran and Yule processes.
1 stars 1 forks source link

Simulation treatments #16

Open Armand1 opened 4 years ago

Armand1 commented 4 years ago

We want to vary the strength of selection, rate of migration and effect of drift in our BCI simulations. What treatments should we use?

The general principle is that, since our aim is to explain the contribution of each force to observed BCI diversity, we should only consider treatments that weaken each force, rather than strengthen it beyond its observed values. In other words, we can diminish the strength of selection (in the extreme, switch it off) but not double its strength.

Most simply we could just have selection on/off; migration on/off; drift on/off. My idea is that we would use a regression equation such as

Delta Diversity ~ selection + migration + drift

to estimate the effect of each independent variable on Delta Diversity. Delta diversity is the difference in diversity between the start and end of each simulation. (actually, it's the same as Diversity at the end, since the start is always the same.) Drift here is in some fashion inversely proportional to census population size --- which is the thing being varied. (I am not quite sure how drift varies with N, but it certainly decreases as N increases).

One problem with this scheme is that we have 3 variables and 8 treatments (although we do, it should be noted, have 100 simulations for each and they are independent). But even so, it might be nice to have a more quantitative approach, for example,

selection (as a fraction of the observed coefficients): 0, 0.5, 1. Now, in fact, we have 2 migration parameters:

delta = number of new individuals gamma = number of new species if either is zero, then migration is zero. For clarity, I propose we call:

delta = m_i gamma=m_2

So, really our model is:

Delta Diversity ~ selection + m_1 + m_2+drift

Anyway, the attached script shows the possible treatments for three levels of all four parameters. There are 45. If you have five treatments for each parameter, for example,

beta<-c(0, 0.25, 0.5, 0.75, 1.0)

Then you have 425 treatments. In that case, I would only 10 simulations per treatment giving 4250 simulations in total. I think that's feasible.

We could also, of course, run an interaction model

Delta Diversity ~ selection m_1 m_2*drift

But I am not clear that we should expect an interaction.

combo-treatments.pdf