# F6-dev-01 — Preston curve in the latest usable World Bank year ## Question Does life expectancy at birth (LE) rise with the log of real income per capita across countries/economies in the latest usable WDI year, and how strong is that link? The estimand is the slope β of the linear projection LE_i = α + β·ln(GDPpc_i) + ε_i. Each country/economy counts once, with equal weight, and GDPpc is measured in PPP constant 2021 international $. The interpretation is descriptive (associational), not causal. ## Data and exclusions Inputs: `wb_indicators.csv` (2349 rows) and `wb_entities.csv` (296 rows) (`n_input_rows`). The SHA-256 hashes match `data/README.md` (see `out/state/data_audit.md`). The exclusion ledger is in `out/exclusions.csv`: 1. Dropped the 44 aggregate entities (region = `Aggregates`): 2349 → 1953 rows, i.e. 217 countries/economies × 9 years (`n_countries_in_population` = 217). 2. Analysis year: the latest year with both indicators for ≥150 countries is **2023** (`analysis_year`). In 2023, 197 countries have both indicators; in 2015–2022 the count is 199 each year (`complete_countries_by_year`). This step leaves 217 rows. 3. Dropped the countries missing an indicator in 2023: `n_excluded_missing` = 20. In every case the missing indicator was GDP; LE is never missing. This leaves `n_analysed` = 197. The 20 dropped are small territories (e.g. Monaco, Liechtenstein, Gibraltar, Guam) and conflict-affected or sanctioned economies (South Sudan, Syria, Yemen, Venezuela, DPRK, Cuba, Eritrea). No imputation was done. Data issues and how they were handled are listed in `data_issues`. The Central African Republic's LE series is erratic (18.8 in 2022, 57.4 in 2023). The West Bank & Gaza value falls by 11.5 years in 2023. Both entities are in the 2023 sample and were kept as reported. A sensitivity run without them is reported below. ## Method - Baseline: the mean-only prediction of LE, scored by RMSE over the 197 analysed countries (`baseline_metric`). - Main model: OLS of LE on ln(GDPpc) with equal weights, scored by the in-sample residual RMSE (`model_metric`). I also report the Pearson r and R². - Uncertainty: heteroskedasticity-robust **HC3** standard error (`effect_se`, `effect_se_type`), with a 95% CI from the t distribution with n−2 degrees of freedom. I chose HC3 because it is the most conservative of the HC variants in finite samples. - Conclusion code: `positive_effect` if the 95% CI lies above zero. - Everything is produced by `out/analysis.py` (statsmodels/numpy; no randomness; `random_seed` = 0 recorded). The script also writes `figure1.png` (scatter plus OLS line) and `table1.csv` (means by income level). ## Results - The fitted line is LE = 22.57 + 5.267·ln(GDPpc) (`intercept`, `effect_estimate`). A 1-log-point (≈2.7×) higher GDP per capita goes with about 5.3 more years of life expectancy. A doubling of income goes with about 0.69 × 5.27 ≈ 3.65 years. - Pearson r = 0.861 (`pearson_r`) and R² = 0.742 (`r_squared`). - Residual RMSE is 3.59 years (`model_metric`), against 7.08 years for the mean-only baseline (`baseline_metric`). That is roughly half the prediction error. - `conclusion` = `positive_effect`: the Preston-curve gradient holds strongly in 2023. - Table 1 (`out/table1.csv`): mean LE rises steadily across income groups. It is 63.2 years in low-income countries (n=20), 67.8 in lower-middle (n=46), 73.7 in upper-middle (n=58) and 79.7 in high-income (n=73). - Figure 1 (`out/figure1.png`) shows the scatter and the fitted line. ## Uncertainty - HC3 SE = 0.211 (`effect_se`); 95% CI [4.85, 5.68] (`effect_ci_low`, `effect_ci_high`), well away from zero. - The SE barely depends on the variant: HC0 0.207, HC1 0.208, HC2 0.209 and classical 0.222 (`sensitivity_se_HC0`, `sensitivity_se_HC1`, `sensitivity_se_HC2`, `sensitivity_se_classical`). - Leaving out any single country moves β only within [5.21, 5.33] (`sensitivity_beta_loo_min`, `sensitivity_beta_loo_max`). - Dropping the two entities with erratic LE series (CAF, PSE) gives β = 5.23 with n = 195 (`sensitivity_beta_drop_erratic_LE`, `sensitivity_n_drop_erratic_LE`). - The CI covers sampling-type uncertainty only. It does not cover measurement error in either indicator or model misspecification. ## Limitations and open issues - **What would invalidate the result.** - Systematic errors in the 2023 PPP GDP or LE estimates. Many 2023 LE values are model-based projections from the UN WPP, not vital registration. The CAF series shows how unstable they can be. - Non-random missingness could also distort the slope. The 20 excluded economies include very rich microstates with high LE (e.g. Monaco, Liechtenstein) and poor conflict economies with low LE (e.g. South Sudan, Yemen). Their combined effect on β is unknown. I did not bound it, because no imputation was allowed. - **Functional form.** The figure suggests the relationship flattens or spreads out at high incomes. Several high-income economies have LE well below the fitted line. I did not identify or investigate these points. A single linear-in-log slope is a summary projection, not a structural curve. I did not test nonlinearity (splines, quadratic terms). - **Not checked.** - Population weighting. The estimand is equally weighted, so microstates count as much as China or India. - Stability across 2015–2022. Only the analysis year was estimated. - Regional heterogeneity. - The quality of GDP PPP for small or dollarised economies. - **Main threats.** - Confounding by health systems, education, disease burden (HIV, malaria), conflict and inequality. - Reverse causality: health raises income. - Ecological fallacy: a cross-country slope says nothing about individual-level effects. - The association must not be read as a causal effect of income. - **2023 specifics.** Post-COVID recovery and conflict shocks (e.g. Gaza) affect individual LE values. The leave-one-out and drop-erratic checks suggest these do not drive β.