View source: R/contact-matrix-utils.R
| normalise_weights | R Documentation |
Normalises participant weights within groups so that they sum to the number of participants in each group. Optionally truncates extreme weights to a threshold and re-normalises.
normalise_weights(participants, by = "age.group", threshold = NULL)
participants |
participant data.table with a |
by |
character; column name(s) to group by (default "age.group") |
threshold |
numeric; if provided, weights above this value are capped and the weights are re-normalised (default NULL) |
the participants data.table (modified by reference)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.