aggregateC: Aggregate a Contact Matrix

Description Usage Arguments Author(s)


The (age) groups of a contact matrix can be joined together by the grouping argument, which first sums over contact groups (columns) and then averages over the corresponding participant groups (rows), optionally using weights such as the age distribution of the study participants.





a square numeric contact matrix such as contactmatrix_POLYMOD.


specification of how to aggregate groups (a named list or an integer vector of group sizes) using aggregateC with the "agedistri" attribute of the contact matrix as weights. If NULL, the original 5-year intervals are returned. The default setting produces the six age groups of Meyer and Held (2017).


specification of how to aggregate groups (alternative to using a named list as the grouping argument).


a named numeric vector containing the weights for the rows of C, typically the age distribution of the participants. The names are matched against rownames(C). A value of NULL is interpreted as uniform weights.


Sebastian Meyer

hhh4contacts documentation built on March 20, 2020, 5:07 p.m.