create_participant_weight | R Documentation |
Weights can be stratified and grouped : weights are computed by strata over each group For example : strata=age, gender and group= week, will allow to compute weekly frequency adjusted by age and gender
create_participant_weight(
age.categories,
year.pop,
groups,
strata,
weekly,
intake
)
age.categories |
age breaks vector (strictly increasing and unique values) |
year.pop |
year of the population to load |
groups |
list of weekly column to use as weight group |
strata |
list of intake columns to use as stratification to compute weight.. Must be one of pop (age.cat or gender) |
weekly |
weekly data |
intake |
intake data |
Strata can be either 'age.cat' or 'gender', since provided population are by age and gender. To have more strata will need to have general population data for each strata.
data.frame() with columns (person_id, 'groups...', 'strata...', weight)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.