This will retrieve mean, 0.025 and 0.975 quantiles from cross_all_2019, cross_under5_2019, cohort_all_2019 and cohort_under5_2019. You can pass a set of year groups to initially aggregate over a range of years. Pass individual years to get mean and quantiles for a year alone.d

fetch_stochastic_data_year_groups(
  annex,
  table,
  groups = c("disease", "country"),
  filters = NULL,
  year_groups = list(c(2000:2019)),
  include_proportion_averted = FALSE
)

Arguments

annex

Connection to annex db

table

One of cross_all, cross_under5, cohort_all or cohort_under5

groups

Categories to group by for aggregating in query, can be any combination of disease and/or country

filters

Filters to apply before aggregation

year_groups

List of year groups to sum over before calculating mean and quantiles. This will sum over all years within range from min & max of each year group. Note that passing a range of years wider than the data itself will only aggregate over the years for which there is data available

include_proportion_averted

If TRUE then calculates mean and quantiles for proportion_deaths_averted = deaths_impact / deaths_novac and for proportion_dalys_averted = dalys_impact / dalys_novac

Value

Mean, 0.025 and 0.975 quantiles for deaths_default, deaths_novac. deaths_impact, dalys_default, dalys_novac, dalys_impact with specified groupings.