stratify_by_risk | R Documentation |
Stratifies the age groups and returns the population size of each age group and risk group.
stratify_by_risk(age_groups, risk_ratios, no_risk_groups, labels)
age_groups |
A vector containing the population size of each age group |
risk_ratios |
A matrix with the fraction in the risk groups. The leftover fraction is assumed to be low risk |
no_risk_groups |
Optional number of risk groups. |
labels |
Optional names for the risk groups. |
A named vector with the population in the low risk groups, followed by the other risk groups. The length is equal to the number of age groups times the number of risk groups (including the low risk group).
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.