# F6-dev-01 — Income and life expectancy across countries (Preston curve) ## Question Does the cross-country relationship between real income per capita and life expectancy hold in the most recent year with usable World Bank data, and how strong is it? The estimand is the slope β of the linear projection LE = α + β·ln(GDPpc) + ε across countries/economies (equal weights), with heteroskedasticity-robust uncertainty. The interpretation is descriptive (associational), not causal. ## Data and exclusions Inputs: `data/wb_indicators.csv` (2,349 entity-year rows) and `data/wb_entities.csv` (296 rows) (`n_input_rows`). SHA-256 hashes match `data/README.md`. Full audit: `out/state/data_audit.md`. Exclusions (`out/exclusions.csv`): 1. I dropped the 44 aggregate entities, i.e. those with region = "Aggregates" (396 rows). That left 217 countries/economies. 2. I selected the analysis year. In 2015–2022, 199 countries have both indicators each year; in 2023, 197 do. Every year therefore passes the ≥150 threshold, so the most recent year is used: `analysis_year` = 2023. 3. I dropped countries missing an indicator in 2023: `n_excluded_missing` = 20. Every one of them is missing GDP per capita; no life-expectancy value is missing. They are ASM, CHI, CUB, ERI, GIB, GUM, IMN, LIE, MAF, MCO, MNP, NCL, PRK, PYF, SSD, SYR, VEN, VGB, VIR, YEM. Nothing was imputed. `n_analysed` = 197 (2349 − 396 − 1736 − 20). The data problems I found, and how each was handled, are listed in `data_issues`. Besides the aggregates and the missing values, they are: an implausibly volatile life-expectancy series for the Central African Republic in earlier years (its 2023 value of 57.4 is plausible and was kept), and life expectancy being reported for every territory, which suggests modelled estimates. ## Method - **Baseline:** predict every country's life expectancy with the sample mean. Its RMSE is `baseline_metric`. - **Main model:** OLS of LE on a constant and ln(GDPpc) (natural log), one observation per country, unweighted (statsmodels). - **Uncertainty:** HC3 heteroskedasticity-robust standard error (`effect_se_type` = "HC3"). The 95% CI is β ± 1.96·SE (normal quantile). - **Fit statistics:** model fit is the RMSE of the residuals (`model_metric`). Pearson r and R² are also reported. - **Conclusion rule:** `positive_effect` if the 95% CI lies above zero. - **Reproducibility:** no randomness is used (`random_seed` = null). `out/analysis.py` regenerates `results.json`, `table1.csv`, `figure1.png` and `exclusions.csv`. ## Results - **Slope:** `effect_estimate` = 5.27 years of life expectancy per log-point of GDP per capita. So a doubling of income is associated with about 0.693 × 5.27 ≈ 3.65 more years. - **Intercept:** `intercept` = 22.57 years. - **Correlation and fit:** `pearson_r` = 0.861 and `r_squared` = 0.742. - **Against the baseline:** the residual RMSE (`model_metric`) is 3.59 years, compared with 7.08 years for the mean-only baseline (`baseline_metric`). That is roughly half the prediction error. - **Conclusion:** `conclusion` = `positive_effect`. The Preston-curve association holds strongly in 2023. Table 1 (`out/table1.csv`) shows mean life expectancy rising steadily across income groups: Low income 63.2 years (n=20), Lower middle 67.8 (n=46), Upper middle 73.7 (n=58), High 79.7 (n=73). Figure 1 (`out/figure1.png`) shows the scatter with the fitted line. ## Uncertainty - **HC3 robust SE:** `effect_se` = 0.211. The 95% CI is [`effect_ci_low` = 4.85, `effect_ci_high` = 5.68], which is far from zero. - **Classical SE:** the conventional OLS SE is similar (`effect_se_classical` = 0.222), so the inference does not depend on the heteroskedasticity correction. - **Caveat:** these standard errors treat countries as draws from a superpopulation. The 197 countries are nearly the whole population, so the CI reflects model or sampling uncertainty in that notional sense. It does not include measurement error in GDP or life expectancy. ## Limitations and open issues - **Missing data are not random.** The 20 excluded economies include conflict-affected or sanctioned states (Syria, Yemen, South Sudan, Venezuela, North Korea, Eritrea, Cuba) and small rich territories (Monaco, Liechtenstein, Isle of Man). Their exclusion could shift the slope in either direction. I did not run a bounds or sensitivity analysis for it. - **The linear-in-log form is a simplification.** The scatter suggests curvature: a flatter slope at high incomes and large negative residuals among some middle-income African and oil economies (e.g. one lower-middle-income country at ~54.5 years). Nonlinearity, influential observations and leverage were not formally tested. The slope is a best-linear-projection summary, not a structural parameter. - **Measurement quality.** Life expectancy for many countries comes from modelled UN WPP estimates, and 2023 values may be provisional and revised later. The Central African Republic's series is erratic. PPP GDP for low-income and conflict economies is also uncertain. Errors in ln(GDPpc) would bias β toward zero. - **It is one year only.** Stability across 2015–2022 (including the COVID-19 years) was not examined, because the task asks for a single cross-section. - **No causal interpretation.** Income is confounded with health systems, education, governance and disease environment, and reverse causality is plausible. Nothing here identifies the effect of raising income. - **Equal weighting.** Each country counts once regardless of population. A population-weighted slope could differ and was not estimated. - **What would invalidate the result:** a misclassified aggregate left in the sample (checked: every iso3 matched the metadata, and the aggregates were removed); a different indicator vintage; or a data error in the 2023 extract. None of these was detected, but the data were not cross-checked against an independent source.