Input Variable Inventory

This inventory covers the inputs currently used from the three dump_ic model dumps, the WEO helper workbook, and the LEB22 helper workbook. The structured companion file is docs/input_variable_inventory.csv.

Model Dump Inputs

All three copied model dumps have the same raw schema:

Raw column Used? Role
year Yes Country-year grouping, reporting periods, and discount exponents
model_central Yes Renamed to val; the model outcome/cost value used in all ROI calculations
model_high No Dropped/skipped
model_low No Dropped/skipped
indicator Yes Parsed to identify cost, deaths, cases, YLD, hospitalization, and HIV disease-state rows
country Yes Renamed to iso; used for country joins
scenario_descriptor Yes Renamed to scenario; current comparison is IC vs CC_2022

Script references:

  • HIV dump read/renamed: R/ROI_HIV.R:74-79
  • TB dump read/renamed: R/ROI_TB.R:41-47
  • Malaria dump read/renamed: R/ROI_MAL.R:20-27

Disease-Specific Dump Indicators

Disease Dump indicators used
HIV cost, age-specific deaths_*, art, selected no-treatment indicators that are mapped into derived symptomatic and AIDSnoTx, then derived YLD
TB cost, yldhivneg, age-specific deaths_*, age-specific cases_*
Malaria cost, yld, age-specific deaths_*, age-specific cases_*, hospitalization

The derived disease-script variables from these dumps include cost_IC, cost_CC, cost_diff, death_IC, death_CC, death_diff, YLD_IC, YLD_CC, YLD_diff, and disease-specific case/hospitalization differences.

WEO Inputs

Local file:

data/raw/helpers/WEOOct24.xlsx

Sheet:

WEOOct2024all (1)

The WEO helper script reads selected columns from this workbook and filters to these WEO subject codes:

  • NGDPRPC
  • NGDPRPPPPC
  • NGDPPC
  • NGDPDPC
  • PPPPC

Script references:

  • WEO read: R/WEO_for_ROI.R:7-17
  • WEO subject-code filter: R/WEO_for_ROI.R:63-69

WEO Columns Used

Raw WEO field Role
ISO Country join key
WEO Subject Code Renamed to indicator; filters the WEO variables
Scale Converts values in Billions or Millions before pivoting
Year columns 2019-2029 Time series values; 2019 is used for the ERI 2022 backfill, 2022-2030 are pivoted

WEO Variables Used In Formulas

WEO variable Role
NGDPRPC Computes GrwthPC, the per-capita growth factor
NGDPDPC Base for NGDP23DPC_R, and denominator for PPPperUSD23
PPPPC Base for PPPPC_23R, and numerator for PPPperUSD23
NGDPRPPPPC Loaded/filled, but I do not see a direct downstream formula use
NGDPPC Loaded/filled, but I do not see a direct downstream formula use

WEO-Derived Outputs Used By Disease Scripts

The disease scripts join only these WEO-derived columns:

Derived WEO variable Used for
ISO Join key
Year Join key
VSLY_USD Intrinsic benefit per DALY
NGDP23DPC_R Productivity gain calculations

These are joined in:

  • R/ROI_HIV.R:380
  • R/ROI_TB.R:319
  • R/ROI_MAL.R:309

LEB22 Location

The local LEB22 input is here:

data/raw/helpers/LEB22_WDI.xlsx

Absolute path:

/Users/sresch/Projects/TGF ROI 26/data/raw/helpers/LEB22_WDI.xlsx

It is configured in config.yml:

leb22_wdi: data/raw/helpers/LEB22_WDI.xlsx

It has one sheet:

Data

with two columns:

  • ISO
  • LEB22

It is read in R/WEO_for_ROI.R:188, joined by ISO, and used to compute:

  • HalfLEB22 = LEB22 * 0.5
  • dHalfLEB
  • VSLY_USD

So LEB22 is not read directly by the disease scripts. It enters the ROI workflow through R/WEO_for_ROI.R, which generates VSLY_USD for the disease scripts.