Create a named list mapping dose to the denominator for dose ratio computation.
Arguments
- ri_data
[data.frame]Routine immunization data in the format required byimpute_missing_doses(). Missing values are permitted only in vaccine-dose columns.- ...
Forces optional arguments to be passed by name and allows for future extensions without breaking existing code. Must be empty.
- dose_names
[character]Character vector of dose names.
Value
[list(dose = birth column)] A named list where each name is a dose id and the value
is the birth column defined in config_pviem(). The function returns the mapping only for dose
columns which contain missing values in ri_data (dose columns to be imputed) among the dose
columns dose_names if provided otherwise among all dose columns. If none of the dose columns
contain missing values, the function returns an empty list.
Details
The default sample pair is determined based on the dose_names argument if provided, otherwise
it is determined based on the column names in ri_data. When using ri_data to determine the
default sample pair, it is recommended to validate it (ri_data) through validate_ri_data()
or validate_all_data() if not done yet to avoid potential issues with missing or misnamed
columns. This is because the function assumes that ri_data contains only dose columns (as
defined in the vaccination schedule data) and admin + time + birth columns (as defined in
config_pviem() by admin, year, month if monthly = TRUE and birth).