# F6-dev-01 — Preston curve in World Bank WDI data ## Question Does the cross-country relationship between real income per capita and life expectancy (the Preston curve) hold in the most recent usable year, and how strong is it? The estimand is the slope β of the equal-weighted linear projection LE_i = α + β·ln(GDPpc_i) + ε_i across countries/economies. LE is life expectancy at birth in years; GDPpc is GDP per capita in PPP constant 2021 international $. β is descriptive (associational), not causal. ## Data and exclusions Inputs: `data/wb_indicators.csv` (2,349 entity-year rows) and `data/wb_entities.csv` (296 entities) (`n_input_rows`). The SHA-256 hashes match `data/README.md` (see `out/state/data_audit.md`). Exclusion ledger (`out/exclusions.csv`): 1. Dropped the 79 entities with region `Aggregates`, i.e. 396 rows. That leaves 1,953 rows covering 217 countries/economies. 2. Kept the analysis year. The number of countries/economies with both indicators is 199 in every year 2015–2022 and 197 in 2023 (`complete_countries_by_year`). The latest year with ≥150 is therefore **2023** (`analysis_year`), which has 217 countries/economies (`n_countries_in_year`). 3. Dropped the **20** countries/economies with a missing indicator (`n_excluded_missing`). All 20 are missing GDP, none is missing LE. There is no imputation. This leaves **197** analysed countries (`n_analysed`). The data problems found and how each was handled are listed in `data_issues`: - Aggregates mixed into the indicator file. - GDP missingness is non-random. The excluded economies are mostly small high-income territories plus conflict or sanctioned states (CUB, ERI, PRK, SSD, SYR, VEN, YEM). - The Central African Republic's LE series is erratic before 2023 (18.8 years in 2022). Its 2023 value of 57.4 is plausible and is kept. - LE in West Bank & Gaza fell by about 11.5 years in 2023. Kept as reported. ## Method - **Baseline:** predict every country's LE by the sample mean. Its RMSE is `baseline_metric`. - **Main model:** OLS of LE on ln(GDPpc), one equally weighted observation per country. I report the in-sample residual RMSE (`model_metric`), R² (`r_squared`) and Pearson r (`pearson_r`). - **Uncertainty:** heteroskedasticity-robust standard error, **HC3** (`effect_se_type`). I chose HC3 because it is the most conservative of the HC variants at this sample size. The 95% CI is β ± t₀.₉₇₅(n−2)·SE (`ci_critical_value_t`). - **Decision rule:** the conclusion code follows from whether the CI excludes zero. - **Sensitivity:** SEs under HC0, HC1, HC2 and the classical formula, and a re-fit after dropping the 5 largest absolute residuals. - **Implementation:** `out/analysis.py` reads only `data/`, uses no randomness (`random_seed` = null), and generates `figure1.png` and `table1.csv`. ## Results - **Fit:** LE = 22.57 (`intercept`) + 5.267 (`effect_estimate`) × ln(GDPpc), with n = 197 (`n_analysed`). - **What the slope means:** a 1-log-point difference in GDP per capita (about 2.7×) goes with 5.27 more years of life expectancy. A doubling goes with about 5.267 × ln 2 ≈ 3.65 years (arithmetic on `effect_estimate`). - **Strength:** Pearson r = 0.861 (`pearson_r`) and R² = 0.742 (`r_squared`). - **Against the baseline:** residual RMSE is 3.59 years (`model_metric`), versus 7.08 years for the mean-only baseline (`baseline_metric`). That is roughly half the prediction error. The mean LE is 73.5 years (`mean_life_expectancy`). - **Conclusion:** `positive_effect` (`conclusion`). The Preston-curve association holds clearly in 2023. - **Table 1** (`out/table1.csv`) shows mean LE rising steadily with income group: | Income group | Countries | Mean LE (years) | |---|---|---| | Low income | 20 | 63.2 | | Lower middle income | 46 | 67.8 | | Upper middle income | 58 | 73.7 | | High income | 73 | 79.7 | - **Figure 1** (`out/figure1.png`) shows the scatter with the fitted line. ## Uncertainty - **Main interval:** HC3 SE = 0.211 (`effect_se`); 95% CI [4.85, 5.68] (`effect_ci_low`, `effect_ci_high`); t ≈ 25 (`effect_t_stat`). - **Other SE formulas:** HC0 0.207 (`sensitivity_se_hc0`), HC1 0.208 (`sensitivity_se_hc1`), HC2 0.209 (`sensitivity_se_hc2`), classical 0.222 (`sensitivity_se_classical`). None of these changes the conclusion. - **Influence of outliers:** dropping the 5 largest residuals (NGA, GRL, NRU, GNQ, GUY; `sensitivity_trim5_dropped_iso3`) gives β = 5.32 (`sensitivity_trim5_effect`), well inside the main CI. - **What the CI means:** the sample is nearly the whole population of economies. The interval therefore describes sampling uncertainty under a superpopulation view of countries, not uncertainty about which countries are included. ## Limitations and open issues - **What would invalidate the result:** - The 2023 values may be revised later, or may be WDI model-based estimates/projections rather than measurements. This is not verifiable from the files. - Missingness may be non-random. The 20 excluded economies include rich microstates (e.g. Monaco, Liechtenstein) and low-LE conflict states (South Sudan, Yemen). Including them could move β in either direction; I did not quantify this. - The definition of the aggregates could be wrong. I relied on the `Aggregates` flag. - **Specification threats:** - The linear-in-log form is a summary. The curve visibly flattens and spreads at high income, where several rich economies sit well below the line. - β is an equal-weighted cross-country association. It is neither population-weighted nor causal. Confounders such as health systems, disease environment and institutions, and reverse causality from health to income, are not addressed. - Countries are not independent (regional clustering, spatial correlation). The robust SE does not account for this, so the CI may be too narrow. - **Not checked:** - Other years. The year is fixed by the rule; I estimated no other year. - Nonlinear or regional specifications. - Measurement error in PPP GDP, which would attenuate β. - Leverage diagnostics beyond the trim-5 refit. - **Data quirks:** the Central African Republic's erratic pre-2023 LE series and the West Bank & Gaza 2023 drop indicate data-quality and shock issues. In 2023 they affect single observations only.