aggregateC: Aggregate a Contact Matrix

Description Usage Arguments Author(s)

View source: R/contactmatrix.R

Description

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.

Usage

1

Arguments

C

a square numeric contact matrix such as contactmatrix_POLYMOD.

grouping

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).

weights

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.

Author(s)

Sebastian Meyer


hhh4contacts documentation built on July 4, 2017, 9:44 a.m.