# wanzi-wang/ifls_midwife architecture

> Architecture diagram of the GitHub repository wanzi-wang/ifls_midwife, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-04). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/wanzi-wang/ifls_midwife
- Repository: https://github.com/wanzi-wang/ifls_midwife

## Overview

This repository is a reproducible applied-economics research project: it links restricted IFLS survey data to village-midwife rollout timing, constructs analysis samples and outcomes, estimates program effects and mechanisms, and reports findings in a paper. The README documents the ordered pipeline and each stage’s purpose; source excerpts were unavailable, so the graph relies on those documented relationships rather than inferred code-level calls.

Main entry points: [`code/R/08_main_regressions.R`](https://github.com/wanzi-wang/ifls_midwife/blob/main/code/R/08_main_regressions.R) (Main estimates), [`code/R/01_load_ifls.R`](https://github.com/wanzi-wang/ifls_midwife/blob/main/code/R/01_load_ifls.R) (Load IFLS), [`code/R/02_birth_roster.R`](https://github.com/wanzi-wang/ifls_midwife/blob/main/code/R/02_birth_roster.R) (Birth roster), [`code/R/03_midwife_rollout.R`](https://github.com/wanzi-wang/ifls_midwife/blob/main/code/R/03_midwife_rollout.R) (Midwife rollout)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_data["Data construction"]
  node_load["Load IFLS<br/>[01_load_ifls.R]"]
  node_births["Birth roster<br/>[02_birth_roster.R]"]
  node_rollout["Midwife rollout"]
  node_outcomes["Adult outcomes<br/>[04_outcomes.R]"]
  node_mediators["Pregnancy mediators<br/>[04b_mediators.R]"]
  node_frame["Analysis frame"]
end

subgraph group_analysis["Empirical analysis"]
  node_weights["Weights and indices"]
  node_descriptives["Balance and descriptives"]
  node_regressions["Main estimates"]
  node_event["Event study<br/>[09_event_study.R]"]
  node_siblings["Sibling fixed effects<br/>[10_sibling_fe.R]"]
  node_robustness["Robustness checks<br/>[11_robustness.R]"]
  node_heterogeneity["Heterogeneity"]
  node_inference["Multiple inference"]
  node_mechanisms["Mechanism estimates<br/>[14_mechanisms.R]"]
  node_map["Rollout map"]
end

subgraph group_reporting["Research outputs"]
  node_paper["Research paper<br/>[paper.tex]"]
end

node_ifls[("IFLS microdata")]

node_ifls -->|"loads"| node_load
node_load -->|"feeds"| node_births
node_births -->|"precedes"| node_rollout
node_rollout -->|"precedes"| node_outcomes
node_outcomes -->|"precedes"| node_mediators
node_mediators -->|"precedes"| node_frame
node_frame -->|"feeds"| node_weights
node_weights -->|"precedes"| node_descriptives
node_descriptives -->|"precedes"| node_regressions
node_regressions -->|"precedes"| node_event
node_event -->|"precedes"| node_siblings
node_siblings -->|"precedes"| node_robustness
node_robustness -->|"precedes"| node_heterogeneity
node_heterogeneity -->|"precedes"| node_inference
node_inference -->|"precedes"| node_mechanisms
node_mechanisms -->|"precedes"| node_map
node_regressions -->|"informs"| node_paper

click node_load "https://github.com/wanzi-wang/ifls_midwife/blob/main/code/R/01_load_ifls.R"
click node_births "https://github.com/wanzi-wang/ifls_midwife/blob/main/code/R/02_birth_roster.R"
click node_rollout "https://github.com/wanzi-wang/ifls_midwife/blob/main/code/R/03_midwife_rollout.R"
click node_outcomes "https://github.com/wanzi-wang/ifls_midwife/blob/main/code/R/04_outcomes.R"
click node_mediators "https://github.com/wanzi-wang/ifls_midwife/blob/main/code/R/04b_mediators.R"
click node_frame "https://github.com/wanzi-wang/ifls_midwife/blob/main/code/R/05_analysis_frame.R"
click node_weights "https://github.com/wanzi-wang/ifls_midwife/blob/main/code/R/06_sample_weights_indices.R"
click node_descriptives "https://github.com/wanzi-wang/ifls_midwife/blob/main/code/R/07_balance_descriptives.R"
click node_regressions "https://github.com/wanzi-wang/ifls_midwife/blob/main/code/R/08_main_regressions.R"
click node_event "https://github.com/wanzi-wang/ifls_midwife/blob/main/code/R/09_event_study.R"
click node_siblings "https://github.com/wanzi-wang/ifls_midwife/blob/main/code/R/10_sibling_fe.R"
click node_robustness "https://github.com/wanzi-wang/ifls_midwife/blob/main/code/R/11_robustness.R"
click node_heterogeneity "https://github.com/wanzi-wang/ifls_midwife/blob/main/code/R/12_heterogeneity_finalize.R"
click node_inference "https://github.com/wanzi-wang/ifls_midwife/blob/main/code/R/13_multiple_inference.R"
click node_mechanisms "https://github.com/wanzi-wang/ifls_midwife/blob/main/code/R/14_mechanisms.R"
click node_map "https://github.com/wanzi-wang/ifls_midwife/blob/main/code/R/16_appendix_figures.R"
click node_paper "https://github.com/wanzi-wang/ifls_midwife/blob/main/paper/paper.tex"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_load,node_births,node_rollout,node_outcomes,node_mediators,node_frame toneBlue
class node_weights,node_descriptives,node_regressions,node_event,node_siblings,node_robustness,node_heterogeneity,node_inference,node_mechanisms,node_map,node_ifls toneAmber
class node_paper toneMint
```

## Components

### Data construction

- [Load IFLS](https://github.com/wanzi-wang/ifls_midwife/blob/main/code/R/01_load_ifls.R): `code/R/01_load_ifls.R`
- [Birth roster](https://github.com/wanzi-wang/ifls_midwife/blob/main/code/R/02_birth_roster.R): `code/R/02_birth_roster.R`
- [Midwife rollout](https://github.com/wanzi-wang/ifls_midwife/blob/main/code/R/03_midwife_rollout.R): `code/R/03_midwife_rollout.R`
- [Adult outcomes](https://github.com/wanzi-wang/ifls_midwife/blob/main/code/R/04_outcomes.R): `code/R/04_outcomes.R`
- [Pregnancy mediators](https://github.com/wanzi-wang/ifls_midwife/blob/main/code/R/04b_mediators.R): `code/R/04b_mediators.R`
- [Analysis frame](https://github.com/wanzi-wang/ifls_midwife/blob/main/code/R/05_analysis_frame.R): `code/R/05_analysis_frame.R`

### Empirical analysis

- [Weights and indices](https://github.com/wanzi-wang/ifls_midwife/blob/main/code/R/06_sample_weights_indices.R): `code/R/06_sample_weights_indices.R`
- [Balance and descriptives](https://github.com/wanzi-wang/ifls_midwife/blob/main/code/R/07_balance_descriptives.R): `code/R/07_balance_descriptives.R`
- [Main estimates](https://github.com/wanzi-wang/ifls_midwife/blob/main/code/R/08_main_regressions.R): `code/R/08_main_regressions.R`
- [Event study](https://github.com/wanzi-wang/ifls_midwife/blob/main/code/R/09_event_study.R): `code/R/09_event_study.R`
- [Sibling fixed effects](https://github.com/wanzi-wang/ifls_midwife/blob/main/code/R/10_sibling_fe.R): `code/R/10_sibling_fe.R`
- [Robustness checks](https://github.com/wanzi-wang/ifls_midwife/blob/main/code/R/11_robustness.R): `code/R/11_robustness.R`
- [Heterogeneity](https://github.com/wanzi-wang/ifls_midwife/blob/main/code/R/12_heterogeneity_finalize.R): `code/R/12_heterogeneity_finalize.R`
- [Multiple inference](https://github.com/wanzi-wang/ifls_midwife/blob/main/code/R/13_multiple_inference.R): `code/R/13_multiple_inference.R`
- [Mechanism estimates](https://github.com/wanzi-wang/ifls_midwife/blob/main/code/R/14_mechanisms.R): `code/R/14_mechanisms.R`
- [Rollout map](https://github.com/wanzi-wang/ifls_midwife/blob/main/code/R/16_appendix_figures.R): `code/R/16_appendix_figures.R`

### Research outputs

- [Research paper](https://github.com/wanzi-wang/ifls_midwife/blob/main/paper/paper.tex): `paper/paper.tex`

### Other components

- **IFLS microdata**

## Connections

- IFLS microdata → Load IFLS: loads (evidence: `README.md`)
- Load IFLS → Birth roster: feeds (evidence: `README.md`)
- Birth roster → Midwife rollout: precedes (evidence: `README.md`)
- Midwife rollout → Adult outcomes: precedes (evidence: `README.md`)
- Adult outcomes → Pregnancy mediators: precedes (evidence: `README.md`)
- Pregnancy mediators → Analysis frame: precedes (evidence: `README.md`)
- Analysis frame → Weights and indices: feeds (evidence: `README.md`)
- Weights and indices → Balance and descriptives: precedes (evidence: `README.md`)
- Balance and descriptives → Main estimates: precedes (evidence: `README.md`)
- Main estimates → Event study: precedes (evidence: `README.md`)
- Event study → Sibling fixed effects: precedes (evidence: `README.md`)
- Sibling fixed effects → Robustness checks: precedes (evidence: `README.md`)
- Robustness checks → Heterogeneity: precedes (evidence: `README.md`)
- Heterogeneity → Multiple inference: precedes (evidence: `README.md`)
- Multiple inference → Mechanism estimates: precedes (evidence: `README.md`)
- Mechanism estimates → Rollout map: precedes (evidence: `README.md`)
- Main estimates → Research paper: informs (evidence: `README.md`)
