generate_incidence_matrix: generate_incidence_matrix

Description Usage Arguments Value Examples

View source: R/generate_incidence_matrix.R

Description

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

Usage

1
generate_incidence_matrix(age_steps, birth_dates, generate_incidence_fun)

Arguments

age_steps

numeric vector of length 1. Indicates the number of steps forward each age group will be aged in the simulation by the do_sim function

birth_dates

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

generate_incidence_fun

a function which takes as arguments age and time and returns a numberic rate of incidence 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_incidence_matrix function.

Value

a matrix of column length age_steps and row length birth_dates, Values stored in the matrix are numeric double, from 0-1, which represent the probability of becoming infected at age and time

Examples

1
y <- generate_incidence_matrix (age_steps = 2, birth_dates = 10:15, generate_incidence)

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