Creates a panel of households who have been surveyed multiple times in successive waves of national surveys in Uganda, primarily the National Panel Surveys
# Constructing a household panel from the Uganda National Panel Survey
Code to link households across eight rounds of the Uganda National Panel Survey
(UNPS), assigning each household a stable identifier that persists across waves.
The UNPS does not provide a single crosswalk linking households over the full
survey period. Identifier conventions change between rounds, households split
and are partially tracked, and refresh samples are added. This script resolves
those links wave by wave and documents the resulting attrition, splits and
additions.
## What it produces
- `data_hhid` — the crosswalk: one row per household, with `hhid_panel` as the
stable identifier and one column per wave (`hhid_W1A` ... `hhid_W8`) holding
that wave's survey identifier.
- `appendix_PANELMAKE.docx` — households retained, lost, split and added at each
wave transition.
- `appendix_HHOBS.docx` — distribution of the number of waves each household is
observed in.
- `appendix_INC.docx` — documentation of inconsistent household ID use in wave 5.
## Data
The source microdata are publicly available from the World Bank Microdata
Library. Registration is required and the data are **not** redistributed here.
Download each round and place it in the corresponding subfolder:
| Folder | Survey round | Survey ID | Catalog |
|---|---|---|---|
| `W1A`, `W1B` | National Panel Survey 2005–2009 | `UGA_2005-2009_UNPS_v02_M` | 1001 |
| `W2` | National Panel Survey 2010–2011 | `UGA_2010_UNPS_v02_M` | 2166 |
| `W3` | National Panel Survey 2011–2012 | `UGA_2011_UNPS_v01_M` | 2059 |
| `W4` | National Panel Survey 2013–2014 | `UGA_2013_UNPS_v02_M` | 2663 |
| `W5` | National Panel Survey 2015–2016 | `UGA_2015_UNPS_v02_M` | 3460 |
| `W6` | National Panel Survey 2018–2019 | `UGA_2018_UNPS_v02_M` | 3795 |
| `W7` | National Panel Survey 2019–2020 | `UGA_2019_UNPS_v03_M` | 3902 |
| `W8` | *[TODO: round, survey ID and catalog link]* | | |
Wave 1A and Wave 1B are two rounds within a single published survey, treated …