generate_infected_mortality_array: generate_infected_mortality_array

Description Usage Arguments Value Examples

View source: R/generate_infected_mortality_array.R

Description

a function that returns a matrix of probabilities of mortality for each age and time step of the simulation

Usage

1
2
generate_infected_mortality_array(age_steps, birth_dates,
  generate_excess_mortality_tau_fun, generate_base_mortality_fun)

Arguments

age_steps

a number. Indicates the number of steps forward each age group will be aged in the simulation by the do_sim function

birth_dates

a numeric vector of length min:max; indicates the range of ages to be included in simulation. Note that date format is not used.

generate_excess_mortality_tau_fun

a function which takes as arguments age, time and tau - i.e. the time since infection among the infected population - and returns a numberic rate of mortality for each age and time included in the simulation This function can be defined by user or can be selected from among several default options included in the package. The user-defined or package default function should be called by name when included as an argument in the generate_base_mortality_matrix function.

generate_base_mortality_fun

a function which takes as arguments age and time and returns a numberic rate of mortality for each age and time included in the simulation. This function can be defined by user or can be selected from among several default options included in the package. The user-defined or package default function should be called by name when included as an argument in the generate_base_mortality_matrix function.

Value

returns an array of dimensions time, age and time since infection

Examples

1
2
3
x <- generate_infected_mortality_array (age_steps = 2, birth_dates = 1992:1995,
generate_excess_mortality_tau_fun = generate_excess_mortality_tau,
generate_base_mortality_fun = generate_base_mortality)

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