Description Usage Arguments Value data.table variables and initialisation
Input is the indices of mothers attempting to lay eggs. Much of this code is regarding the handling of CI:
Neither mother nor father carry Wolbachia: no Wolbachia in offspring
Mother carries Wolbachia: offspring have nonzero probability of carrying
Mother does not carry, father does: offspring suffer CI and won't hatch
Latitude/Longitude of agents is determined as the same position that the mother is currently at. Clutch sizes, as per literature, differ depending on Wolbachia status of mother. This is handled by the ABC parameter eta_1 and eta_2.
1 | initialise_eggs(toLay, eta_1, eta_2, p_1, alpha_j, mozzie.dt, graveyard)
|
toLay |
List of the indices of mothers attempting to lay a clutch. |
eta_1 |
Clutch size of non-Wolbachia carrying mothers. |
eta_2 |
Clutch size Wolbachia carrying mothers. |
p_1 |
Probability of complete maternal Wolbachia transmission. |
alpha_j |
Juvenile mortality rate. |
A data.table of juvenile agents in stage 1 corresponding to each mother in toLay. Subset mozzie.dt to just include mothers who are laying this makes it easy to assign variable values on to children try and use mothers.dt as much as possible as this ensures we are keeping everything in the right order Clutch will be initialised at the same position as its mother below is me adapting the above for optimisation The idea here is to split eggs.dt into those who have alive dads and thos who have dead dads. I'll then get the wolbachia status (carry/not carry) for each agent and then rowbind them together at the end. —– end adaptation EDIT 21-9-20: VECTORISE THE ABOVE CODE We need to do two loops: one for those who have alive fathers and one for those whose fathers are dead r is a vector of the father's infStatus for every juvenile clutch in alive.dads. Now for those with dads in the graveyard
ID of mother.
ID of father.
Age in days. Initialised at 0 since they're new!
Development stage of clutch. Should only be 1 since these are eggs.
Probability of carrying Wolbachia. 0: no Wolbachia, -1: Cytoplasmic Incompatability, else infProb is nonzero.
Initial north/south or 'y' coordinate of agent. Should start with -16. Should be same as mother.
Initial east/west of 'x' coordinate of agent. Should start with 145. Should be same as mother.
Number of juveniles in the clutch.
Probability of death.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.