| Title: | Diagnostics for Vaccine Impact Modelling Consortium Burden and Impact Estimates |
|---|---|
| Description: | Run diagnostics on burden estimates submitted by modellers in the Vaccine Impact Modelling Consortium (VIMC) and impact estimates calculated by the VIMC Science & Policy team. |
| Authors: | Pratik Gupte [aut, cre] (ORCID: <https://orcid.org/0000-0001-5294-7819>), Katy Gaythorpe [aut] (ORCID: <https://orcid.org/0000-0003-3734-9081>), Xiang Li [aut] (ORCID: <https://orcid.org/0000-0002-5945-159X>), Zoë Gibney [aut] (ORCID: <https://orcid.org/0009-0002-8114-9984>), Imperial College of Science, Technology and Medicine [cph, fnd] |
| Maintainer: | Pratik Gupte <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 0.0.3 |
| Built: | 2026-05-11 09:19:31 UTC |
| Source: | https://github.com/vimc/vimcheck |
Run diagnostics on burden estimates submitted by modellers in the Vaccine Impact Modelling Consortium (VIMC) and impact estimates calculated by the VIMC Science & Policy team.
Maintainer: Pratik Gupte [email protected] (ORCID)
Authors:
Other contributors:
Imperial College of Science, Technology and Medicine [copyright holder, funder]
Useful links:
Report bugs at https://github.com/vimc/vimcheck/issues
Helper function for sanity checks on burden estimate values. Checks whether any burden estimates are non-numeric, missing, or negative.
basic_burden_sanity(burden)basic_burden_sanity(burden)
burden |
A |
A character vector of messages generated by checks on burden estimates, with the length of the vector depending on how many checks fail.
Check the modelled disease burden data has similar population sizes as the provided population data.
check_demography_alignment( burden_set, wpp, gender = c("Both", "Male", "Female") )check_demography_alignment( burden_set, wpp, gender = c("Both", "Male", "Female") )
burden_set |
A |
wpp |
Population estimates for the country in |
gender |
The assigned sex for which demography is to be checked. Options
are |
A <tibble> giving the alignment, i.e., percentage difference of
modelled population size from the WPP-derived population estimates.
Package constants
file_dict_colnames scenario_data_colnames burden_outcome_names colnames_plot_demog_comparefile_dict_colnames scenario_data_colnames burden_outcome_names colnames_plot_demog_compare
An object of class character of length 5.
An object of class character of length 4.
An object of class character of length 10.
An object of class character of length 7.
An example of the central burden template provided by VIMC to modelling groups.
eg_burden_templateeg_burden_template
eg_burden_templateA data frame with 10,201 rows and 11 columns:
Disease name
Year
Age
Country name in short format; this is a placeholder name.
Country name in long format; this is a placeholder.
Cases of the disease averted
.
DALYs averted
.
Deaths averted
.
Years of life-loss averted
.
Population size of the country in a year
.
Vaccination scenario.
Prepared by the VIMC secretariat.
Example of scenario coverage data
eg_coverageeg_coverage
eg_coverageA data frame with 11 rows and 19 columns.
Scenario type name.
Scenario type description string.
Scenario name string.
Scenario description string.
Coverage set string.
String for whether GAVI supported the scenario.
String identifier for the source.
Infection identifier.
Vaccine identifier.
Vaccination activity identifier.
Year
Country name in short format; this is a placeholder name.
Age limit lower limit.
Age limit upper limit.
Description of age range.
Target for vaccination.
Proportional coverage.
Sex to which data applies, may be "Male", "Female", or "Both".
Proportional risk value.
Prepared by the VIMC secretariat.
Example data of fully-vaccinated persons (FVPs).
eg_fvpseg_fvps
eg_fvpsA data frame with 11 rows and 24 columns:
Scenario type name.
Scenario type description string.
Scenario name string.
Scenario description string.
Coverage set string.
String for whether GAVI supported the scenario.
String identifier for the source.
Infection identifier.
Vaccine identifier.
Vaccination activity identifier.
Year
Country name in short format; this is a placeholder name.
Age limit lower limit.
Age limit upper limit.
Description of age range.
Target for vaccination.
Proportional coverage.
Sex to which data applies, may be "Male", "Female", or "Both".
Proportional risk value.
Job code as a numeric.
Count of FVPs.
Count of adjusted FVPs.
Adjusted vaccination target.
Ratio of adjusted FVPs to adjusted target.
Prepared by the VIMC secretariat.
An example of the population estimate data used by VIMC.
eg_wppeg_wpp
eg_wppA data frame with 65,448 rows and 5 columns:
Country name; this is a placeholder name.
Year
Age
Sex given as three categories, "Male", "Female", or "Both"
.
Population size
Derived from data originally prepared by the United Nations as part of the World Population Prospects: https://population.un.org/wpp/.
Plotting functions for burden and impact diagnostics. All functions operate on data prepared for plotting by a corresponding plotting-preparation function.
plot_compare_demography(data, fig_number) plot_age_patterns(burden_age, fig_number) plot_global_burden_decades(burden_decades, fig_number) plot_global_burden(burden_data, outcome_name, fig_number) plot_coverage_set(coverage_set, fig_number) plot_fvp(fvp_data, fig_number)plot_compare_demography(data, fig_number) plot_age_patterns(burden_age, fig_number) plot_global_burden_decades(burden_decades, fig_number) plot_global_burden(burden_data, outcome_name, fig_number) plot_coverage_set(coverage_set, fig_number) plot_fvp(fvp_data, fig_number)
data |
A |
fig_number |
The figure number displayed in the plot title. |
burden_age |
A |
burden_decades |
A |
burden_data |
This is expected to be a |
outcome_name |
A string for an outcome name. Allowed outcome names are given in the package constant constants. |
coverage_set |
A |
fvp_data |
A |
A <ggplot> object that can be printed to screen in the plot frame
or saved to an output device (i.e., saved as an image file).
Transform burden estimate data from modelling groups to make them suitable for plotting using an appropriate plotting function. Each preparation function corresponds to a plotting function.
prep_plot_demography(burden) prep_plot_age(burden) prep_plot_burden_decades(burden, year_max) prep_plot_global_burden(burden) prep_plot_coverage_set(coverage) prep_plot_fvp(fvp, year_min, year_max)prep_plot_demography(burden) prep_plot_age(burden) prep_plot_burden_decades(burden, year_max) prep_plot_global_burden(burden) prep_plot_coverage_set(coverage) prep_plot_fvp(fvp, year_min, year_max)
burden |
For |
year_max |
The maximum year to be represented in a subsequent figure.
For |
coverage |
WIP. Coverage data. |
fvp |
WIP. Data on counts of fully vaccinated persons. |
year_min |
Minimum year. |
For prep_plot_demography(): a <tibble> in long-format, with the
identifier-columns, "scenario", "age", and "year", with the added column
"value_millions".
For prep_plot_age(): a <tibble> with the columns "scenario",
"burden_outcome", "age", "value_millions".
For prep_plot_burden_decades(): a <tibble> with the columns "scenario",
"burden_outcome", "decade_label", and "value_millions".
For prep_plot_global_burden(): a nested <tibble> with the string
column "burden_outcome", and a list column of tibbles "burden_data".
For prep_plot_coverage_set(): WIP
For prep_plot_fvp(): WIP.
A simple plotting theme building on ggplot2::theme_bw().
theme_vimc(x_text_angle = 45, y_text_angle = 0, ...) theme_vimc_noxaxis()theme_vimc(x_text_angle = 45, y_text_angle = 0, ...) theme_vimc_noxaxis()
x_text_angle |
The angle for X-axis labels. Defaults to 45 degrees. |
y_text_angle |
The angle for Y-axis labels. Defaults to 0 degrees. |
... |
< |
A ggplot2 theme that can be added to ggplot2 plots or objects.
# using an inbuilt dataset data(mtcars) # standard theme ggplot2::ggplot(mtcars, ggplot2::aes(disp, mpg)) + ggplot2::geom_point() + theme_vimc() # with X-axis suppression ggplot2::ggplot(mtcars, ggplot2::aes(disp, mpg)) + ggplot2::geom_point() + theme_vimc_noxaxis()# using an inbuilt dataset data(mtcars) # standard theme ggplot2::ggplot(mtcars, ggplot2::aes(disp, mpg)) + ggplot2::geom_point() + theme_vimc() # with X-axis suppression ggplot2::ggplot(mtcars, ggplot2::aes(disp, mpg)) + ggplot2::geom_point() + theme_vimc_noxaxis()
Check that incoming data files in a burden estimate are complete, and that
no extra files have been included.
This function expects that incoming burden files are in the
directory given by path_burden, which holds a file dictionary which maps
each data file to a specific scenario.
validate_complete_incoming_files(path_burden = "incoming_burden_estimates")validate_complete_incoming_files(path_burden = "incoming_burden_estimates")
path_burden |
A directory with burden estimate data. |
A <tibble> of the scenario file dictionary in path_burden if all
checks pass. Otherwise, exits with informative errors on failed checks.
Function to create a file_dictionary template.
It maps to touchstone disease scenarios and you will see expected number of
scenarios i.e. the number of files that we expect from a model.
Users should populate the file column to match the scenario-file.
This function will run if a file_dictionary.csv file does not exist
validate_file_dict_template(disease, path_burden = "incoming_burden_estimates")validate_file_dict_template(disease, path_burden = "incoming_burden_estimates")
disease |
A disease identifier. |
path_burden |
A directory with burden estimate data. |
Nothing; called primarily for its side-effects.
If the file path_burden/file_dictionary.csv does not exist, a file
dictionary CSV file is written to the same location.
Prints a message to screen informing the user whether any action has been
taken.
Identify extra and missing columns and rows in burden data.
validate_template_alignment(burden_set, template)validate_template_alignment(burden_set, template)
burden_set |
A |
template |
A |
A named list of checks carried out on burden_set to compare it
against template, with information on missing and extra data.