Replication material for Demographic Research 2023 journal article: "The dynamic role of household structure on under-five mortality in southern and eastern sub-Saharan Africa" Menashe-Oren, Bocquier, Ginsburg, Compaoré & Collinson This file explains the different steps taken, and needed to replicate the results of the paper, including: where to get the data, and what variables are needed how to generate time-varying household sturcture variables, modelling of child mortality. The zipped folder includes two programs (Stata do files): hh_structure_hdss.do & child_mortality_hh.do Stata-SE 17 was used for analysis. 1. Data Health and Demographic Surveillance Systems (HDSS) data are readily available for free download through the ishare INDEPTH data repository. The dataset used is "Consolidated HDSS data from 29 sub-Saharan African Sites, 1990-2018". https://www.indepth-ishare.org/index.php/catalog/181 We used the HDSS sites for which there was a household identifer (LocationId), and events of in- and out-migration, and internal movements within the site were recorded consistently. We focused on eastern and southern Africa, and therefore limited our analysis to 15 HDSS. The HDSS are of different population sizes, ranging from around 3,000 under-five year old children in Harar Urban (Ethiopia), to 47,000 in Ifakara Rural (Tanzania). The HDSS also cover different periods between 1993 to 2016. The downloaded data includes the below variables (decribed in parenthesis) which are needed for analysis: CountryId (country identifier) CentreId (HDSS site identifier) IndividualId (unique anonymised identifier of individuals within sites) concat_IndividualId (unique identifier of individuals across HDSS sites) LocationId (residence within site - unique household identifier within sites) MotherId (identifier of mother) Sex DoB (date of birth) EventCode (type of event: enumeration, birth, death, in-migration, out-migration, entry to household, exit from household, end of observation) datebeg (start date) EventDate (date of event) residence (whether individual is resident in HDSS site or not, based on a six-month threshold) calendar_year (year) censor_death (identifier of death events) 2. Creating time-varying household structure variables The Stata do file "hh_structure_hdss" prepares the data for creating household structure measures, ensuring consistency in events. Household structure size are constructed according to the population balancing equation, counting all in and out movements from the household. Similarly, the number of household members by age and sex are counted at the time of each event. 3. Modelling under-five mortality The analysis of under-five mortality is based on a set of Cox models, using the computed household structure measures. The Stata do file "child_mortality_hh" replicates the steps taken, using the data file created with the hh_structure_hdss dofile. Household typology is determined in this file (based on the number of members by age and sex in the household). Maternal variables (mother's age at birth, death and migration status) are also created in this file. To add maternal events with the child events according to correct order of events, time-merging is required (tmerge ado available here https://github.com/bocquier/mighealth)