F1-conf-02 — Balanced-panel mean life expectancy, 2000–2022
Question
How much did life expectancy at birth (WDI SP.DYN.LE00.IN) change from 2000 to 2022 in a fixed set of countries? The estimand is the unweighted mean over countries (by iso3) with a recorded value in every year 2000–2022, each counted once.
Data and exclusions
Input: data/life_expectancy_panel.csv, 439 data rows (n_input_rows), 20 distinct countries (n_countries_total). Problems found (data_issues):
- Türkiye (TUR) appears twice for every year, under the names "Turkey" and "Turkiye". The two copies have identical values. I kept one row per (iso3, year), which removed 23 rows.
- Switzerland (CHE) has an empty cell for 2007. I treated it as missing and did not impute it, so CHE is not in the balanced set.
- Bangladesh, Ethiopia, India and Nigeria (BGD, ETH, IND, NGA) have no rows for 2000–2010. They are not in the balanced set.
Exclusion ledger (out/exclusions.csv): 439 rows → 416 after removing duplicates → 416 after the year-window filter → 415 after dropping the missing cell → 345 after keeping only balanced countries (n_analysed). The balanced set has 15 countries (n_countries_balanced, balanced_countries: AUS, AUT, BEL, CAN, DEU, ESP, FRA, GBR, ITA, JPN, KOR, NLD, SWE, TUR, USA). 5 countries are incomplete (n_countries_incomplete).
Method
For each year I took the simple mean over the 15 balanced countries (out/analysis.py; out/balanced_means_by_year.csv is a supplementary output). The change is the 2022 mean minus the 2000 mean. The baseline is the mean over all distinct countries with a recorded 2022 value (20 countries, n_countries_2022_available), with TUR counted once. The method uses no randomness (random_seed = null).
Results
- Balanced mean in 2000: 78.060 years (
mean_2000_balanced= 78.060267). - Balanced mean in 2022: 81.553 years (
mean_2022_balanced= 81.553067). - Change from 2000 to 2022: +3.493 years (
change_2000_2022_balanced= 3.4928). - Baseline, mean over all 20 countries with a 2022 value: 78.692 years (
mean_2022_all_available). This is lower than the balanced 2022 mean because four of the five excluded countries (BGD, ETH, IND, NGA) have lower life expectancy. The baseline is not a measure of change over time. - Feasibility:
feasibility= "complete".
Uncertainty
These are descriptive means over a fixed set of countries; they are not estimates from a sample. I therefore report no sampling standard errors or confidence intervals. The remaining uncertainty is measurement and revision error in the WDI figures, which I cannot quantify from this file. I checked the figures independently with a pivot/dropna recomputation, which matched exactly, and a re-run of the script gave byte-identical output (out/state/checks.md).
Limitations and open issues
- The balanced set contains only high- and upper-middle-income countries (all OECD members). Switzerland is excluded because of a single missing year (2007), and four lower-income countries are excluded because they have no data before 2011. The result therefore does not represent all 20 countries.
- The countries are equally weighted, not weighted by population.
- I resolved the TUR duplicates only because both copies agree exactly. The script stops if a duplicate pair ever has conflicting values.
- Year-on-year jumps of more than 1.5 years occur in 2020–2022 (e.g. ESP, USA, IND, TUR, BGD). I kept them unchanged, since the task allows no external lookup. They are consistent with COVID-era mortality shocks and recovery.