Skip to contents

The R twin of morie verify-pollution: resolves the exposure (demo data, a CSV with an exposure and optional income column, or scalar arguments), logs the assumptions, and when they all hold runs the concentration-response, attributable-fraction, mortality-displaced, burden and equity stages.

Usage

morie_verify_pollution(
  pollutant,
  outcome = "all_cause_mortality",
  region = NULL,
  years = NULL,
  demo = FALSE,
  exposure_csv = NULL,
  exposure_mean = 0,
  exposure_prevalence = 0,
  reference = 5.8,
  baseline_rate = 500,
  population = 1e+06
)

Arguments

pollutant

"no2" or "pm25".

outcome

Outcome key for the concentration-response function.

region, years

Labels for the report.

demo

Use synthetic demo data.

exposure_csv

Path of a CSV with an exposure column.

exposure_mean, exposure_prevalence

Scalar inputs used when neither demo nor exposure_csv is given.

reference

Counterfactual reference concentration.

baseline_rate

Baseline outcome rate per 100,000 per year.

population

Population at risk.

Value

The report as a list; its status is "ok", "assumption_failure" or "error", and the attribute exit_status carries the command-line exit code (0, 1 or 2).

Examples

r <- morie_verify_pollution("no2", demo = TRUE)
r$status
#> [1] "ok"
r$pipeline$paf
#> [1] 0.03533756