Divides the rank-2K array of weighted contact counts produced by
weighted_matrix_array() by the participant-side weight totals
(cross-tabulated over the same grouping columns), giving the mean
number of contacts per participant. Cells with no participants
become NA.
normalise_weights_to_counts(
sampled_participants,
weighted_matrix,
groupings = default_age_groupings()
)the array with the same dim and dimnames as
weighted_matrix
the sampled participants data.table
(must have sampled.weight plus the participant columns referenced
by groupings)
a rank-2K array of weighted contact counts
a list of grouping triples (see resolve_groupings());
defaults to single-age, matching pre-existing single-grouping output