Description Usage Arguments Value Author(s)
View source: R/makeContactMatrix.R
Rebins an arbitrary contact matrix to a new group of population ranges. The default behavior is to use the UK POLYMOD data.
1 2 3 4 5 6 | makeContactMatrix(
ages,
originalContactMatrix = flumodelsutil::flumodelsutil_data$POLYMOD.matrix,
originalContactMatrixAges = flumodelsutil::flumodelsutil_data$POLYMOD.age.ranges,
originalPopulationFractions = flumodelsutil::flumodelsutil_data$population.UK
)
|
ages |
Vector of ages. Each element represents the upper range of an age range. The lowest bound is presumed to be zero. If the oldest age does not reach the end of the population range, an additional element is added to span the full range. The final age bracket cannot start after the final bracket of originalContactMatrixAges. |
originalContactMatrix |
Contact matrix to serve as the basis for extrapolation. Defaults to UK POLYMOD. This must be a square matrix. |
originalContactMatrixAges |
Age ranges associated with originalContactMatrix. Defaults to UK population in 5-year bins, with the final bracket starting at age 70. The format is a data frame with columns representing the age brackets and having two rows: AgeStart and AgeEnd. The first column has ageStart of 0. The last column has ageEnd of NA. |
originalPopulationFractions |
Vector of age fractions associated with originalContactMatrixAges. Length must equal the dimension of originalContactMatrix. The vector will be normalized, so it can represent population fractions or population in each age bin. |
A contact matrix.
Jason Asher <jason.m.asher@gmail.com>
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.