Learn How to Use The DHS Program’s Code Share Library on GitHub
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 codeshare@dhsprogram.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!
The RDHS 2019-21 Tables 10.6 and 10.11. I can’t understand the difference between the first two columns. If a child had diarrohea and did not seek treatment why are they allocated to a health facility type? Can someone explain these slides?
Great question! The first column of Table 10.6 includes all children with symptoms of ARI in the denominator (13) irrespective of whether they sought advice or treatment, and the second column includes all children with symptoms of ARI for whom advice or treatment was sought (101). The information in the numerators about the source of advice or treatment is the same in both columns. So we can see that advice or treatment was sought from the public sector for 63.2% of all children with symptoms of ARI, and advice or treatment was sought from the public sector for 85.7% of all children with symptoms of ARI for whom advice or treatment was sought. Similarly, in Table 10.11 the first column includes all children with diarrhea in the denominator (1,141) and the second column includes only children with diarrhea for whom advice or treatment was sought (606). Again the numerators (the source of advice or treatment) is the same for both columns. So we can see that advice or treatment was sought from the public sector for 42.5% of all children with diarrhea, and advice or treatment was sought from the public sector for 80.0% of children with diarrhea for whom advice or treatment was sought.