Description Usage Arguments Value Examples

View source: R/do_simulation.R

a function that simulates an age and time structured population from a non-mechanistic model. The user specifies a range of ages, a number of steps forward in time that the population will be aged, and functions specifying the birth rate, incidence mortality and excess mortality among infected members of the popultion. The funciton returns a matrix - or matrices - of the total number of individual members of the simulated population who are infected and susceptible at each age and time specified by the user. The function also returns a matrix - or matrices - of the prevalence of infection at each age and time.

1 2 3 4 5 | ```
do_simiulation(total_births, birth_dates, delta, age_steps,
generate_birth_counts_fun = generate_birth_counts,
generate_incidence_fun = generate_incidence,
generate_base_mortality_fun = generate_base_mortality,
generate_base_mortality_tau_fun = generate_base_mortality_fun)
``` |

`total_births` |
a number, indicates the total number of individual members of the population |

`birth_dates` |
a vector of numbers, indicating the minimum and the maximum ages to be included in the simulation |

`delta` |
a number, indicates the rate of change between each age/time step, which is used to calculate the total number of births |

`age_steps` |
a number, indicates the number of steps forward in time that the population will be aged |

`generate_birth_counts_fun` |
a function, indicating the rate that birth occur for each age and time May be user defined. Otherwise a default value requiring no additional input to the argument of the do dim function is provided by the package |

`generate_incidence_fun` |
a function, indicating the incidence rate for each age and time May be user defined. Otherwise a default value requiring no additional input to the argument of the do dim function is provided by the package |

`generate_base_mortality_fun` |
a function, indicating the rate of mortality in the non-infected population May be user defined. Otherwise a default value requiring no additional input to the argument of the do dim function is provided by the package |

`generate_base_mortality_tau_fun` |
a function, indicating the rate of mortality in the infected population May be user defined. Otherwise a default value requiring no additional input to the argument of the do dim function is provided by the package |

a list, including a matrix of counts of the infected population, a matrix of counts of the susceptible population, and a matrix of the prevalence of infection among the total population at each age and time indicated by the simulation

1 2 3 4 5 6 7 8 | ```
do_simiulation(total_births = 1000,
birth_dates = 1945:1950,
delta = 1,
age_steps = 3,
generate_birth_counts_fun = generate_birth_counts,
generate_incidence_fun = generate_incidence,
generate_base_mortality_fun = generate_base_mortality,
generate_base_mortality_tau_fun = generate_excess_mortality_tau)
``` |

laurettemhlanga/seams_population_simulation documentation built on Jan. 17, 2019, 12:45 a.m.

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.