Description of files for replicating results in "Decomposing changes in household measures: Household size and services in South Africa 1994-2012" Data: The data to replicate the results on the national datasets can all be obtained from the DataFirst on-line portal www.datafirst.uct.ac.za We have noted the version numbers of the datasets that we have used. If the current version on the portal no longer corresponds to the version that we have used, our version can be requested from the DataFirst manager, Lynn Woolfrey (Lynn.Woolfrey@uct.ac.za). We have used two additional datasets (both included in this zip file): qlfsgeodata.dta this contains an urban/rural identifier for the QLFS data (this wasn't in PALMS v2.1) ceweight4.dta this contains the recalibrated weights that we used in some of our data work The Agincourt HDSS data is currently not in the public domain, because of concerns about maintaining confidentiality. Program Files: The following Stata code files are included: Analyse_HHdistribution_MW.do This do file calculates the household size distribution that is used in Table 1 Analyse_HHsize_MW.do This do file generates Figure 1 and Figure 5 Analyse_HHelec_MW.do This do file generates Figure 2 hhsize_decomp_MW.do This file does the household size decomposition on the Agincourt data. This is the material that goes into Table 2 (see below for the files that do the decomposition for NIDS) energy_summ_MW.do This file generates Figure 6 energy_summ2_MW.do This file generates the OHS/GHS statistics that go into Table 3 energy_decomp_MW.do This decomposes the electricity data for Agincourt. This is the material for Table 4. Program files to generate the NIDS panel output: NIDS_HHPanel_tagHHs_step1.do This do file prepares the National Income Dynamic Study (NIDS) data and identifies the following according to our chosen household definition: 1. Whether households continue to exist or dissolves between one observational period and the next 2. Whether household in a given observational period have survived from a previous observation period NIDS_HHPanel_genpanel_step2.do This do file identifies which performs the following tasks: 1. Identifies which households form part of the panel and which do not 2. Imputes household formation/dissolution information for unobserved household, or household with missing information 3. Uses information on which households survive or dissolve, and which are newly formed, to set up the NIDS data as a panel of households 4. Generates appropriate household panel weights for the panel of households 5. Adjusts the household panel weights to account for household attrition NIDS_HHPanel_analysis_step3.do This do file merges in the necessary variables from the original NIDS data and performs the analysis required to construct the tables included in the paper.