DHS Ethiopia 2024–25 Case Study Outline — svy
Validates svy’s Taylor linearisation (and, in a second phase, jackknife) against the sampling error appendix of the 2024–25 EDHS final report (FR399). Unlike the LFS Canada study, the producer here publishes the results (Appendix B: estimate, SE, DEFT, CI for ~130 indicators × 17 domains), not reference code — so the validation target is the published tables themselves.
Design facts and target numbers below were transcribed from FR399.pdf (Appendix A pp. 451–457, Appendix B pp. 463–468) on 2026-08-29. svy API calls verified against svy 0.26.0. Microdata pending DHS Program approval — dataset filenames and design-variable choices marked TBD until the files arrive.
0. Scope decisions (state up front in the case study)
| Decision | Choice | Why |
|---|---|---|
| Validation target | Appendix B, Tables B.2 (national), B.3–B.4 (urban/rural), regional tables | The producer’s own SAS/Taylor output. No reference code published, so the tables are the ground truth. |
| Phase 1 estimators | Proportions and means, Taylor linearisation | Matches ICF’s method for means/proportions/ratios. Direct one-to-one comparison. |
| Phase 2 (maybe separate post) | Jackknife (delete-one-cluster, 797 reps) | ICF uses JRR only for complex rates (TFR, mortality). svy has create_jk_wgts but no TFR/mortality-rate estimators — reproducing those estimators is out of scope; reproducing the JK variance machinery on a proportion is feasible. |
| Datasets | IR (women) + PR/HR (household population) first; KR (children) for vaccination if phase 1 goes fast | Table B.2 splits into HOUSEHOLDS AND POPULATION (PR/HR base) and WOMEN (IR base). Two files cover most rows. |
| Weight | v005/1e6 (IR), hv005/1e6 (HR/PR) |
Standard DHS. Weights are normalised — valid for means/proportions/ratios, not totals. The report says this itself (A.4), which makes a clean callout. |
| Design variables | psu = v021, strata = v022 — TBD: confirm v022 vs v023 against the file |
Sampling strata should be region × urban/rural = 27 (Addis Ababa has no rural stratum). Acceptance check: the strata variable must have exactly 27 levels and cross-tab cleanly with v024 × v025. |
| Subpopulations | where= everywhere, never filter |
Same footgun as NHANES: subsetting rows treats domain size as fixed and biases the variance. Appendix B bases are all subpopulations (currently married women, women with a live birth in last 2 years, …). |
| Domains | by= for urban/rural and the 14 regions |
One pass reproduces Tables B.3–B.20’s structure. |
| FPC | None (pop_size not set) |
ICF’s formula drops the (1−f) factor explicitly: “f … is so small that it is ignored.” svy without pop_size matches. |
| HIV prevalence | Out of scope | Needs the AR recode merged in, separate weights (A.4 lists 7 weight sets), extra approval sensitivities. Mention, don’t do. |
| GPS / spatial | Out of scope | Not requested; different abstract. |
1. The survey (Background section material)
- 2024–25 EDHS, fifth in the series (2000, 2005, 2011, 2016). Frame: 2019 Population and Housing Census cartographic frame from the Ethiopian Statistical Service — 149,215 residential EAs. 14 regions.
- Representative for national, urban/rural, and each of the 14 regions.
- Fieldwork disruption worth narrating: 8 of the 75 Amhara clusters were not interviewed for security reasons (1 urban, 7 rural). Weights were adjusted for cluster nonresponse at the stratum level. 805 selected clusters → 797 non-empty clusters, which is also the JRR replicate count.
- Report interpretation example to reuse: mean children ever born 2.432 ± 2 × 0.041 → CI (2.351, 2.513). Average women’s-survey DEFT is 2.282.
2. The design (Appendix A → svy)
Two-stage stratified:
- 27 strata = 14 regions × urban/rural, minus rural Addis Ababa.
- Stage 1: 805 EAs by PPS (households from the 2019 PHC as MOS); implicit stratification via frame sorting. Large EAs (urban >300 hh, rural >200 hh) segmented; one segment kept PPS. A “cluster” = EA or segment.
- Stage 2: fixed 28 households per cluster, equal-probability systematic, from a fresh listing. No replacements.
- Weights: inverse selection probability × nonresponse adjustments (cluster, household, individual — all at stratum level), then normalised so weighted cases = unweighted cases nationally. Seven weight sets (household, women, men’s-survey household, men, domestic violence, HIV-w, HIV-m).
The svy setup is the whole point of the post — three lines:
import svy
women = svy.read_stata("ETIR8?FL.DTA") # TBD: actual filename on approval
sample = svy.Sample(
data=women.with_columns((svy.col("v005") / 1e6).alias("wgt")),
design=svy.Design(stratum="v022", psu="v021", wgt="wgt"),
)
cpr = sample.estimation.prop(
"using_modern", where=svy.col("v502") == 1, by="v025"
)(Exact column expressions TBD against codebook; where semantics and method="taylor"-by-default verified in 0.26.0.)
3. Validation targets (Table B.2, total sample)
Transcribed 2026-08-29; re-verify against the PDF before publication.
| Indicator | Base | R | SE | N (unwtd) | DEFT |
|---|---|---|---|---|---|
| Electricity as primary source of lighting | de jure household pop | 0.402 | 0.019 | 95,594 | 5.061 |
| Improved drinking water source | de jure household pop | 0.716 | 0.017 | 95,594 | 4.714 |
| Urban residence | women 15–49 | 0.346 | 0.010 | 21,395 | 3.164 |
| No education | women 15–49 | 0.325 | 0.009 | 21,395 | 2.927 |
| Currently married/in union | women 15–49 | 0.613 | 0.007 | 21,395 | 2.077 |
| Currently using any contraceptive method | currently married 15–49 | 0.354 | 0.012 | 13,007 | 2.638 |
| Currently using any modern method | currently married 15–49 | 0.345 | 0.011 | 13,007 | 2.640 |
| Unmet need total | currently married 15–49 | 0.154 | 0.006 | 13,007 | 1.902 |
| Mean children ever born (15–49) | women 15–49 | 2.432 | 0.041 | 21,395 | 2.243 |
| Received ANC from skilled provider | women w/ live birth, last 2 yrs | 0.781 | 0.014 | 5,021 | 2.454 |
| Delivered in a health facility | live births, last 2 yrs | 0.614 | 0.021 | 5,208 | 2.934 |
Success criterion: match R to the printed 3 decimals, SE/DEFT to printed precision. Exact float agreement is not expected against a PDF table — this is “published-precision” validation, framed like the LFS post’s Daily comparison, not like its Part A. Cross-check svy vs R survey (svydesign(ids=~v021, strata=~v022, weights=~wgt)) and/or Stata svyset at full float precision — that’s where the tight (1e-15-style) agreement claim can live.
Watch for: lonely PSUs. If any region×residence stratum ends up with a single cluster in a subpopulation table, note how ICF’s SAS handles it vs svy’s Singleton/SingletonHandling options. Could be its own callout.
4. Domain estimation
by="v025"(urban/rural) → Tables B.3–B.4;by="v024"(region) → regional tables. One call per indicator, 17 published domains covered.- Narrative point: DHS runs each domain as a separate SAS job; svy does it in one pass over the undamaged design. Variance still uses all strata (domain estimation, not subset estimation).
- Regional mortality/fertility use 10-year windows vs 5-year national — a reason regional rate rows are NOT phase-1 targets.
5. DEFT section
DEFT = SE_design / SE_srs is reported for every cell and averages 2.282 for women. Checked svy’s implementation (svy-rs estimation/taylor.rs, verified 2026-08-29 against svy 0.26.0):
deff="wr"is Kish’s deft²: SRS variance = weighted S² / n, no FPC, weight-scale-invariant, with zero-weight (out-of-domain) rows excluded from- S² uses the n/(n−1) factor, so a proportion’s SRS variance is effectively p(1−p)/(n−1) with weighted p and unweighted domain n.
deff="wor"uses sum(w) as N for the FPC whenpop_sizeis absent. DHS weights are normalised (sum(w) ≈ n), so the FPC degenerates — svy deliberately returns a structured error rather than deff ≈ 1e16. Usedeff="wr"and say why; the error itself is a teachable moment about normalised weights.- ICF’s DEFT also omits f (“so small that it is ignored”) and computes the SRS reference from the weighted estimate at unweighted n, so
sqrt(deff_wr)is the right comparator. Residual conventions to confirm empirically: n vs n−1 in ICF’s SRS denominator (invisible at printed precision for n in the thousands) and the domain-n definition on subpopulation rows.
The lighting indicator’s DEFT of 5.06 is a nice hook: electrification is spatially clustered, so 95,594 people carry the information of ~3,700 SRS draws. Contrast with currently-married-in-union at 2.08 — attitudes and statuses cluster less than infrastructure.
6. Phase 2 sketch (probably a follow-up post, not this one)
- JRR: 797 delete-one-cluster replicates, unstratified, k(k−1) scaling with r_i = k·r − (k−1)·r_(i). Map to
create_jk_wgts(...)— check svy’s JK flavour (stratified delete-one is the default; DHS’s is unstratified) and the matching scale/df convention before promising anything. - TFR (4.049, SE 0.108) and U5MR (51.263, SE 4.304) need DHS-specific rate estimators (person-years exposure, synthetic cohort probabilities) that svy does not implement. Say so plainly; do not hand-wave.
6b. Scope decision: no GLM / chi-square in this piece (2026-08-29)
Keep this post strictly validation. GLM and Rao-Scott chi-square sections would have no published reference number to match (the report has no regressions or test statistics) and would dilute the one falsifiable claim. NHANES already owns the analytic-workflow showcase. Instead: a one-paragraph closer — the same svy.Design object drives regression/ChiSquare, teased as a follow-up case study (“determinants of modern contraceptive use”, validated against R svyglm/svychisq at float precision, same data request/abstract covers it).
7. Compliance / boilerplate
- DHS data may not be redistributed — repo gets code + published-table comparisons only, never microdata.
.gitignorethe DTA files (mirror the LFS folder’s approach). - Citation: Ethiopian Statistical Service (ESS) and ICF. 2025(?). Ethiopia Demographic and Health Survey 2024–25. Verify exact citation page (FR399 p. 4).
- Footer disclaimer mirroring LFS: use of the data does not imply endorsement by the DHS Program.
8. Proposed index.qmd skeleton
- Summary / TL;DR callout — design in 3 lines of svy; N indicators × 17 domains reproduced at published precision; cross-checked against R at float precision.
- Background — the survey, the security-related cluster loss, what Appendix B publishes.
- The design, from Appendix A to
svy.Design— strata/PSU/weight table, normalised-weights callout (no totals!). - Reproducing Appendix B — national table, then
by=domains. - Design effects — the DEFT story.
- What doesn’t match and why — printed rounding, any lonely-PSU rows, jackknife rows excluded.
- Cross-language check — R survey (and/or Stata) at float precision.
- References + DHS disclaimer + community-signal callout.