Run the model to estimate the health impacts attributable to household air pollution for GCAM scenarios

calc_hap_impacts(
  db_path = NULL,
  query_path = "./inst/extdata",
  db_name = NULL,
  prj_name,
  scen_name,
  queries = "queries_rhap.xml",
  final_db_year = 2100,
  saveOutput = TRUE,
  map = FALSE,
  anim = TRUE,
  HIA_var = "deaths",
  normalized = FALSE,
  by_gr = FALSE,
  fit_result = NULL
)

Arguments

db_path

Path to the GCAM database

query_path

Path to the query file

db_name

Name of the GCAM database

prj_name

Name of the rgcam project. This can be an existing project, or, if not, this will be the name

scen_name

Vector names of the GCAM scenarios to be processed

queries

Name of the GCAM query file. The file by default includes the queries required to run rfasst

final_db_year

Final year in the GCAM database (this allows to process databases with user-defined "stop periods")

saveOutput

Writes the emission files. By default=TRUE

map

Produce the maps. By default = FALSE

anim

If set to TRUE, produces multi-year animations. By default=TRUE

HIA_var

Health metric to be predicted. c("deaths", "yll", "dalys"). By default = deaths

normalized

Transform the output to "normalized" values. By default = FALSE

by_gr

Report within-country income-decile group shares of population, PM2.5+NOx exposure, and GDP as a CSV table plus a pie-chart snapshot at final_db_year (output/by_gr/). Descriptive only – it does not estimate group-level health impacts, since the regression model is fit on between-country variation and was never validated against within-country/sub-national variation. By default = FALSE

fit_result

Optional pre-computed result from fit_model(HIA_var), e.g. from a previous call, to reuse instead of refitting the national regression from scratch. fit_model() doesn't depend on GCAM scenario data at all, so refitting it (including its Driscoll-Kraay vcov, which isn't cheap) on every calc_hap_impacts() call is pure waste when comparing many scenarios for the same HIA_var. Must have been fit with the same HIA_var as this call; a mismatch raises an error rather than silently using the wrong model. By default = NULL (fits internally).

Value

Health impacts attributable to HAP for all the selected years, as a tibble of scenario, country, year, pred_var, pred_value, pred_value_normalized, reliability_ratio, and reliability. The last two flag how much of a country's predicted level rests on fit_model()'s bias-adder correction rather than on the regression's own covariates (reliability_ratio = abs(bias.adder)/naive prediction; reliability is a "high"/"medium"/"low" label over that ratio, thresholds 0.5 and 2) – "low" flags a country whose absolute-level prediction the model has little independent basis for, not necessarily a wrong number.