stratify_by_risk: Stratify age groups into different risk groups

View source: R/demography.R

stratify_by_riskR Documentation

Stratify age groups into different risk groups

Description

Stratifies the age groups and returns the population size of each age group and risk group.

Usage

stratify_by_risk(age_groups, risk_ratios, no_risk_groups, labels)

Arguments

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.

Value

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


MJomaba/flu-evidence-synthesis documentation built on April 26, 2022, 11:12 p.m.