incidence_vector: incidence_vector

View source: R/incidence_matrix.R

incidence_vectorR Documentation

incidence_vector

Description

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

Usage

incidence_vector(n_age_steps, date_of_birth, incidence, time_step)

Arguments

n_age_steps

The maximuma age attained by each birth cohort (aging steps).

date_of_birth

a numeric vectors indicating the dates in simulation. Note that date format is not used.

incidence

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.

time_step

the time step between consecurtive birth dates in the vector list_of_birth_times

Value

a matrix of column length of date birthas, Values stored in the matrix are numeric double, from 0-1, which represent the incidence rate at given age and time


laurettemhlanga/PopulationSimulation documentation built on Sept. 9, 2023, 12:39 p.m.