initialise_eggs: Creates a data.table of newly laid eggs to add to the...

Description Usage Arguments Value data.table variables and initialisation

View source: R/constructors.R

Description

Input is the indices of mothers attempting to lay eggs. Much of this code is regarding the handling of CI:

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.

Usage

1
initialise_eggs(toLay, eta_1, eta_2, p_1, alpha_j, mozzie.dt, graveyard)

Arguments

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.

Value

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

data.table variables and initialisation

motherID:

ID of mother.

fatherID:

ID of father.

age:

Age in days. Initialised at 0 since they're new!

stage:

Development stage of clutch. Should only be 1 since these are eggs.

infProb:

Probability of carrying Wolbachia. 0: no Wolbachia, -1: Cytoplasmic Incompatability, else infProb is nonzero.

lat:

Initial north/south or 'y' coordinate of agent. Should start with -16. Should be same as mother.

long:

Initial east/west of 'x' coordinate of agent. Should start with 145. Should be same as mother.

clutchSize:

Number of juveniles in the clutch.

pDeath:

Probability of death.


beeysian/cairnsmozzie documentation built on Feb. 15, 2021, 12:12 a.m.