This repository contains code that users may find useful when analyzing DHS survey data.
This code can be used to identify the strata variable for a DHS survey. In recent DHS surveys this is usually v022, hv022, mv002. Exceptions to this are found in this do file and mainly apply to older DHS surveys. This code is only for DHS surveys and does not check the strata for MIS, AIS, and interim surveys.
Examples of merge code can be found in the MergeCode folder. Not all possible merge combinations are available but the most common types of merge. Model datasets are used to show examples.
For more detailed explanation on merging please check the DHS Program website for this topic Merging DHS data
The Guide to DHS Statistics also contains explanations and examples of merging using DHS data. This can be found in Chapter 1 section "Analyzing DHS Data" in the Guide to DHS Statistics.
When possible code that was used for DHS analysis reports will be made available in this repository. The code will be stored in a folder with the report ID (for instance AS81 for the urban poverty study) or by topic (for instance effective coverage).
You can search for all DHS publications and reports on the DHS publication search page