# F6-dev-01 — Preston curve in the latest usable WDI year ## Question Across countries/economies, how strongly is life expectancy at birth (LE, years) associated with the natural log of GDP per capita (PPP, constant 2021 intl $) in the most recent year with usable World Bank data? Estimand: slope β of the linear projection LE = α + β·ln(GDPpc) + ε, one equally weighted observation per country. The interpretation is descriptive/associational, not causal. ## Data and exclusions Inputs: `data/wb_indicators.csv` (2349 rows) and `data/wb_entities.csv` (296 rows) (`n_input_rows`); SHA-256 hashes match `data/README.md` (see `out/state/data_audit.md`). Exclusion ledger (`out/exclusions.csv`): 1. Dropped 396 entity-year rows belonging to 44 aggregate entities (region = `Aggregates`) → 1953 rows, 217 countries/economies. 2. Analysis year: countries with both indicators number 199 in every year 2015–2022 and 197 in 2023 (`complete_countries_by_year`); the latest year with ≥150 is **2023** (`analysis_year`). Kept 217 country rows (`n_countries_in_analysis_year`). 3. Dropped 20 countries with a missing indicator in 2023 (`n_excluded_missing`); all 20 lack GDP (life expectancy is never missing). No imputation was done. The analysis uses **197** countries (`n_analysed`). 2349 − 396 − 1736 − 20 = 197. Data problems and how each was handled are listed in `data_issues`: the aggregates; the 20 missing countries (ASM, CHI, CUB, ERI, GIB, GUM, IMN, LIE, MAF, MCO, MNP, NCL, PRK, PYF, SSD, SYR, VEN, VGB, VIR, YEM); an implausibly volatile Central African Republic LE series in earlier years (its 2023 value of 57.4 looks plausible and was kept); and the drop in West Bank and Gaza LE in 2023 (kept as reported). ## Method - Baseline: predict every country's LE with the cross-country mean. Its RMSE is `baseline_metric`. - Main model: OLS of LE on ln(GDPpc) over the 197 countries, unweighted. Standard errors are heteroskedasticity-robust **HC3** (`se_type`). HC3 was picked because it is the most conservative of HC0–HC3 in moderate samples. The 95% CI is β ± 1.96·SE (normal approximation). The fit metric is the RMSE of the in-sample residuals (`model_metric`). - Conclusion rule as given in TASK.md: `positive_effect` if the 95% CI lies entirely above 0. - Supplementary check, not part of the estimand: re-estimate after dropping the 5 countries with the largest Cook's distance (`supp_sens_drop5_*`). HC0–HC2 and classical SEs are also reported (`supp_effect_se_by_type`, `supp_effect_se_classical`). - `out/analysis.py` regenerates everything deterministically. It uses no randomness (`random_seed` = null). - Outputs: `out/figure1.png` (scatter plot with the OLS line) and `out/table1.csv` (means by income group). ## Results - Slope: **β = 5.27 years per log point** of GDP per capita (`effect_estimate` = 5.267). Intercept 22.57 years (`intercept`). A 10% income difference therefore goes with about 0.50 more years of LE (5.267·ln 1.1, derived from `effect_estimate`). A doubling goes with about 3.65 years (5.267·ln 2). - Strength: Pearson r = 0.861 (`pearson_r`), R² = 0.742 (`r_squared`). - Fit: residual RMSE is 3.59 years (`model_metric`), against 7.08 years for the mean-only baseline (`baseline_metric`). ln(GDPpc) roughly halves the prediction error. - Conclusion: `positive_effect`. In 2023 the Preston-curve association holds and is strong. - Table 1 (`out/table1.csv`): mean LE rises with income group, from 63.2 years (Low income, n=20) to 67.8 (Lower middle income, n=46), 73.7 (Upper middle income, n=58) and 79.7 (High income, n=73). - Largest negative residual: Nigeria, −15.3 years (`supp_largest_neg_residual_iso3`, `supp_largest_neg_residual`). ## Uncertainty - HC3 SE = 0.211 (`effect_se`). 95% CI for β: [4.85, 5.68] (`effect_ci_low`, `effect_ci_high`), well away from zero. - The choice among robust SEs makes little difference: HC0 0.207, HC1 0.208, HC2 0.209, HC3 0.211, classical 0.222 (`supp_effect_se_by_type`, `supp_effect_se_classical`). - Dropping the 5 most influential countries (NGA, GRL, TCD, SLB, GUY; `supp_sens_drop5_cooks_iso3`) gives β = 5.32 (SE 0.183), inside the main CI (`supp_sens_drop5_effect_estimate`, `supp_sens_drop5_effect_se`). - The CI covers sampling-style uncertainty only, treating countries as independent draws from a superpopulation. The 197 countries are close to the full population of economies, so this is a modelling convention. The CI does not cover measurement error, model misspecification or non-random missingness. ## Limitations and open issues - **No causal interpretation.** β is an association. Confounders such as institutions, education, health technology, disease environment and conflict affect both income and LE, and causation can also run from health to income. - **Functional form.** The linear-in-log line is a projection. The figure shows curvature at the top: LE flattens among high-income economies, and the low-income residuals are widely spread. A nonlinear or spline fit was not estimated, so β is an average slope over the income range, not a constant marginal effect. - **Non-random missingness.** The 20 excluded economies are either small high-income territories (e.g. MCO, LIE, GIB) or conflict-affected/sanctioned states (SSD, SYR, YEM, VEN, PRK, CUB, ERI). Their direction of bias is unclear, and no bounding analysis was done. - **Measurement and data quality.** GDP PPP figures for fragile states and small territories are imprecise, and errors in ln(GDPpc) would bias β toward zero (attenuation). LE estimates for countries without complete vital registration are modelled, not observed. The CAF series shows implausible year-to-year swings (18.8 years in 2022), which suggests vintage or modelling artefacts in the LE data. 2023 values were not validated against external sources. - **Single year.** 2023 can still carry post-COVID mortality effects and conflict shocks (e.g. West Bank and Gaza). Stability across 2015–2022 was not checked because the task restricts the analysis to the selected year. - **Equal weighting.** Each economy counts once whatever its population, so tiny territories weigh as much as India or China. A population-weighted slope would answer a different question and was not computed. - **What would invalidate the result:** a misclassification of aggregates as countries (checked: all 44 aggregate entities in the file were removed via the region flag); a systematic revision of the 2023 WDI vintage; or leverage concentrated in a few points (partly checked with the leave-5-out sensitivity, which did not change the conclusion). Not checked: heavier-tailed inference (e.g. bootstrap), spatial or regional correlation of errors (regional clustering would probably widen the CI), and outliers beyond the 5 most influential points.