| Title: | Age-Structured Population Dynamics Model |
|---|---|
| Description: | Implements discrete time deterministic and stochastic age-structured population dynamics models described in Erguler and others (2016) <doi:10.1371/journal.pone.0149282> and Erguler and others (2017) <doi:10.1371/journal.pone.0174293>. |
| Authors: | Kamil Erguler [aut, cre] |
| Maintainer: | Kamil Erguler <[email protected]> |
| License: | GPL (>= 3) |
| Version: | 0.6 |
| Built: | 2026-05-14 06:24:34 UTC |
| Source: | https://github.com/kerguler/albopictusr |
Implements the "spop" class for age-structured population dynamics modelling. For more information, see class description.
Kamil Erguler, Associate Research Scientist, EEWRC, The Cyprus Institute [email protected]
Kamil Erguler, Stephanie E Smith-Unna, Joanna Waldock, Yiannis Proestos, George K Christophides, Jos Lelieveld, Paul E Parham. Large-scale modelling of the environmentally-driven population dynamics of temperate Aedes albopictus (Skuse). PLOS ONE, 2016
Kamil Erguler, Nastassya L Chandra, Yiannis Proestos, Jos Lelieveld, George K Christophides, Paul E Parham. A large-scale stochastic spatiotemporal model for Aedes albopictus-borne chikungunya epidemiology. PLOS ONE, 2017
Useful links:
Introduce a batch of individuals with a given age
add(x) <- value ## S4 replacement method for signature 'spop,data.frame' add(x) <- valueadd(x) <- value ## S4 replacement method for signature 'spop,data.frame' add(x) <- value
x |
spop class instant |
value |
|
Read the number of dead individuals after each iteration
dead(x) ## S4 method for signature 'spop' dead(x)dead(x) ## S4 method for signature 'spop' dead(x)
x |
spop class instant |
Read the number of individuals designated to complete their development
developed(x) ## S4 method for signature 'spop' developed(x)developed(x) ## S4 method for signature 'spop' developed(x)
x |
spop class instant |
Read the number, age, and development cycles of individuals completing their development after each iteration
devtable(x) ## S4 method for signature 'spop' devtable(x)devtable(x) ## S4 method for signature 'spop' devtable(x)
x |
spop class instant |
Gamma-distributed probability of death or development happening in the next iteration
gamma_dist_prob(xr, mn, std)gamma_dist_prob(xr, mn, std)
xr |
age of individuals |
mn |
mean age of death or development |
std |
standard deviation of the age of death or development |
Iterate the population for one day
iterate(x) <- value ## S4 replacement method for signature 'spop,data.frame' iterate(x) <- valueiterate(x) <- value ## S4 replacement method for signature 'spop,data.frame' iterate(x) <- value
x |
spop class instant |
value |
|
Negative binomial-distributed probability of death or development happening in the next iteration
nbinom_dist_prob(xr, mn, std)nbinom_dist_prob(xr, mn, std)
xr |
age of individuals |
mn |
mean age of death or development |
std |
standard deviation of the age of death or development |
Iterate the population for one day keeping age and development fixed
perturb(x) <- value ## S4 replacement method for signature 'spop,data.frame' perturb(x) <- valueperturb(x) <- value ## S4 replacement method for signature 'spop,data.frame' perturb(x) <- value
x |
spop class instant |
value |
|
Read the total number of individuals
size(x) ## S4 method for signature 'spop' size(x)size(x) ## S4 method for signature 'spop' size(x)
x |
spop class instant |
spop implements the deterministic and stochastic age-structured population dynamics models described in Erguler et al. 2016 and 2017
add introduces a batch of individuals with a given age, completed development cycles, and degree of development (default: 0)
iterate iterates the population for one day and calculates (overwrites) the number of dead individuals and the number of individuals designated to complete their development
devtable reads the number, age, and development cycle of individuals designated to complete their development
developed reads the total number of individuals designated to complete their development
dead reads the number of dead individuals after each iteration
size reads the total number of individuals
This is an R implementation of the age-structured population dynamics models described in Erguler et al. 2016 and 2017. The spop class records the number and age of individuals and implements two processes to exit from the population: development and death. The two processes act upon the population sequentially; survival is imposed prior to development. If the population survives for one day, then, it is allowed to grow and complete its development. Survival and development are defined either with an age-independent daily probability, or an age-dependent gamma- or negative binomial-distributed probability.
stochastic: a logical value indicating a deterministic or a stochastic population dynamics
prob: a character string indicating the basis of age-dependent survival or development (gamma: gamma-distributed, nbinom: negative binomial-distributed)
# Generate a population with stochastic dynamics s <- spop(stochastic=TRUE) # Add 1000 20-day-old individuals add(s) <- data.frame(number=1000,age=20) # Iterate one day without death and assume development in 20 (+-5) days (gamma-distributed) iterate(s) <- data.frame(dev_mean=20,dev_sd=5,death=0) print(developed(s)) # Iterate another day assuming no development but age-dependent survival # Let each individual survive for 20 days (+-5) (gamma-distributed) iterate(s) <- data.frame(death_mean=20,death_sd=5,dev=0) print(dead(s)) # Note that the previous values of developed and dead will be overwritten by this command # Generate a deterministic population and observe the difference s <- spop(stochastic=FALSE) add(s) <- data.frame(number=1000,age=20) iterate(s) <- data.frame(dev_mean=20,dev_sd=5,death=0) print(developed(s)) iterate(s) <- data.frame(death_mean=20,death_sd=5,dev=0) print(dead(s))# Generate a population with stochastic dynamics s <- spop(stochastic=TRUE) # Add 1000 20-day-old individuals add(s) <- data.frame(number=1000,age=20) # Iterate one day without death and assume development in 20 (+-5) days (gamma-distributed) iterate(s) <- data.frame(dev_mean=20,dev_sd=5,death=0) print(developed(s)) # Iterate another day assuming no development but age-dependent survival # Let each individual survive for 20 days (+-5) (gamma-distributed) iterate(s) <- data.frame(death_mean=20,death_sd=5,dev=0) print(dead(s)) # Note that the previous values of developed and dead will be overwritten by this command # Generate a deterministic population and observe the difference s <- spop(stochastic=FALSE) add(s) <- data.frame(number=1000,age=20) iterate(s) <- data.frame(dev_mean=20,dev_sd=5,death=0) print(developed(s)) iterate(s) <- data.frame(death_mean=20,death_sd=5,dev=0) print(dead(s))