ben18785 / Selection_simulations

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

BCI migration #15

Open Jeronimo-cid opened 4 years ago

Jeronimo-cid commented 4 years ago

Hi @ben18785 and @Armand1 , this issue is to settle some doubts I have about migration.

I implemented migration as @ben18785 suggested in the email of the 16/07/2020 (16:32), first generating the total number of migrants and then allocating them to the species generated using a multinomial with flat probabilities.

The issue is this, the number of individual migrants generated with the delta parameter I obtained from inmigration.rds file is around 20 individual migrants each generation (generations are in census years). In the real data however, there are 3.86 migrant individuals per census year, and around 27 during the whole period (1985-2015). This makes me think that we are generating more migrants per census year than we are observing - intuitively I would think that we should generate around 4 each census year, not 20, and around 27 every 35 years (or 7 census years).

This is the number of migrants generated through a poisson distribuition with average the delta parameter from inmigration.rds image

and this is the real data on migrants, were I subsetted with R the counts per year of the migrant species, I manually found in excel the migration events (in yellow) and calculated the average number of migrant individuals and migrant species per censusyear. image

Perhaps it is just a small inexactitude. Would like to hear your thoughts, and see if I have done anything wrong.