The DHS Program recently released three YouTube tutorial videos to help DHS data users access The DHS Program’s Code Share Library on GitHub. The Code Share Library was started in 2018 to provide code for producing DHS indicators listed in the Guide to DHS Statistics using statistical software like Stata or SPSS. This year, The DHS Program has begun preparing R code as well. You do not need to create a GitHub account to copy or download any code to produce DHS indicators; it is publicly available for use.
The first video, Overview of The DHS Program’s Code Share Library on GitHub, explains the main components of the Code Share Library, including Stata and SPSS repositories, the indicator list, ReadMe file, and chapter folder contents. In each repository on GitHub, there is an important ReadMe file with instructions for users to read before using the code provided.
The second tutorial video, Preparing to Run The DHS Program’s Shared Code in Stata, demonstrates how to prepare to run code to produce DHS indicators in the statistical software Stata using the model datasets. The model datasets were created strictly for practice and do not represent any country’s actual data. Unlike datasets for specific surveys, users do NOT need to register to download model datasets.
One way to start using the Code Share Library is to download the entire repository on your computer. If any update is made to the code in the future, you will need to download the updated code from the Code Share Library. Another way to run the code is to copy and paste the code for your indicator of interest from GitHub to your own personal do file, without having to download the entire repository.
The third video, Running The DHS Program’s Shared Code on Stata, demonstrates how to run the code in Stata to construct indicator variables and produce tables for the indicators. The tables provide a simple tabulation that follows the standard DHS tabulation plan used for survey final reports.
If you do not understand why an indicator was coded in a specific way, check the Guide to DHS Statistics. If you have further questions, email us at email@example.com or post your question on The DHS Program User Forum. Follow The DHS Program on Twitter, Facebook, and LinkedIn for the latest news about code updates (including forthcoming R code), survey dataset releases, and more. Happy coding!