SPB Git

spb/wp29_uqo

Public
4.0 KB · 33 lines markdown
1# F1-conf-02 — Balanced-panel mean life expectancy, 2000–202223## Question4How much did life expectancy at birth (WDI `SP.DYN.LE00.IN`) change between 2000 and 2022 across a fixed set of countries? The estimand is the unweighted mean over countries with a recorded value in every year 2000–2022 (the balanced panel), each country counted once.56## Data and exclusions7Input: `data/life_expectancy_panel.csv`, 439 data rows (`n_input_rows`), 20 distinct iso3 codes (`n_countries_total`). Problems found (`data_issues`):8- **TUR duplicated**: Türkiye appears under two spellings ("Turkey", "Turkiye"), so all 23 (iso3, year) pairs appear twice with identical values. This is an assembly error. I kept one row per (iso3, year); 23 rows removed.9- **BGD, ETH, IND, NGA** have rows only for 2011–2022. Their 2000–2010 values are treated as missing, not imputed, so these countries are excluded (48 rows).10- **CHE** has an empty value for 2007, so it is excluded (23 rows).1112Ledger (`out/exclusions.csv`): 439 → 416 → 368 → 345 = `n_analysed` (15 countries × 23 years). Balanced set (`balanced_countries`, `n_countries_balanced` = 15): AUS, AUT, BEL, CAN, DEU, ESP, FRA, GBR, ITA, JPN, KOR, NLD, SWE, TUR, USA. Incomplete: 5 (`n_countries_incomplete`).1314## Method15`out/analysis.py` removes duplicate (iso3, year) rows. It first checks that duplicates agree, and it would stop if they conflicted. It then keeps the countries that have a non-missing value in all 23 years and takes the simple mean across those countries for 2000 and for 2022. The baseline is the simple mean over all distinct countries with a recorded 2022 value (20 countries, `n_countries_2022_available`), after removing the duplicates. The method is deterministic and uses no randomness (`random_seed` = null).1617## Results18- Balanced mean 2000: **78.060 years** (`mean_2000_balanced`).19- Balanced mean 2022: **81.553 years** (`mean_2022_balanced`).20- Change 2000→2022: **+3.493 years** (`change_2000_2022_balanced`).21- Baseline, naive 2022 mean over all available countries: **78.692 years** (`mean_2022_all_available`). It is lower than the balanced 2022 mean because it includes the four lower-life-expectancy countries that are only observed from 2011. It is not comparable with the 2000 balanced mean.22- Sensitivity: if the duplicate TUR rows had not been removed, the naive 2022 mean would be 78.640 (`sensitivity_mean_2022_naive_with_duplicate_rows`). Every balanced country has exactly one value per year, so the balanced means do not depend on this choice.2324## Uncertainty25These figures describe a fixed, fully enumerated set of countries. They are not a sample estimate, so I report no confidence interval. Countries differ in how much they changed. The standard deviation of the per-country changes is 1.409 years (`change_per_country_sd`). The smallest change was +0.797 for USA (`change_per_country_min`, `change_per_country_min_iso3`) and the largest +6.770 for KOR (`change_per_country_max`, `change_per_country_max_iso3`). Values are rounded to 3 decimals at the source, so rounding error in the means is negligible (<0.001 years).2627## Limitations and open issues28- The balanced set has 15 mostly high-income countries. The result does not represent the full 20-country list, and the means are not population-weighted.29- The missing 2000–2010 values for BGD, ETH, IND and NGA probably come from the narrower first extraction and not from real gaps in WDI. The task rules forbid looking them up or imputing them, so those countries are excluded. Including them would probably change the mean levels a lot.30- Choosing "Turkiye" as the single name for TUR is cosmetic; the duplicate values were identical.31- WDI values are revised between releases. These results apply to the release described in `data/README.md`.32- Process note: I first wrote `analysis.py` into `data/out/` by mistake because the working directory was wrong. I moved it to `out/` and removed the stray directory. The input file hashes were checked afterwards and are unchanged.33
Files · main
Menu

Theme