* -----------------------------------------------------------------------------* * * SOMALILAND HOUSEHOLD * SURVEY (SLHS) 2013 * *------------------------------------------------------------------------------* The following simple steps allow you to carry out the household analysis in Stata from the 2013 Somaliland Household Survey: A) SETTING UP THE FOLDER STRUCTURE IN YOUR COMPUTER 1 - From the "Other materials" subsection in the Microdata library, download "Somaliland Household Survey 2013 - Do files". Unzip it and open the "setup.do" file. Next, define a directory in your computer and include the folder location in line 8 of the do file (Example of line 8: local swdLocal = "C:\Users\JohnStata\Desktop\Somaliland HS"). This location will contain the files from the Microdata Library in a specific folder structure (see next steps), and where the output datasets for the analysis will be placed 2 - Next, run the "setup.do" file; this process will automatically create the folder structure needed to do the analysis in your computer, and install the packages used in the process. In the selected location, you will now have 4 folders (Data, Do, Output & Temp) and 3 subfolder in the "Data" folder (1-CleanInput, 1-CleanTemp & 1-CleanOutput). Close "setup.do"; this file is only intended to be used once while setting up the folder structure in your computer, thus you do not need to save any changes and/or a copy of it. B) DOWLOADING THE FILES TO THE CORRECT FOLDER 3 - From "Somaliland Household Survey 2013 - Do files", unzip the "Do" folder and put its content (12 do files) in the "Do" folder created by "setup.do" in the selected location of your computer 4 - From the Microdata library, download the "Data in Stata" file, unzip it and put the 6 files whose name begins with "Input" in the "1-CleanInput" subfolder from the "Data" folder created by "setup.do". Rename the files by removing the prefix "Input " (including the space at the end) for each of the 6 files. C) USING THE DO FILES 5 - Afterwards, open the "init.do" file from the "Do" folder of your computer, and include in line 11 the same general directory from your computer as in step 1 (in "setup.do"). That is, the location that contains the 4 folders (Data, Do, Output & Temp). (Example of line 11: local swdLocal = "C:\Users\JohnStata\Desktop\Somaliland HS"). Save the changes and close the "init.do" file. 6 - To run any do file, first open "init.do" and the do file you want to use. Then, copy and paste all the code from "init.do" in the "command" window of the do file you want to use. Hit enter to run the code, and make sure all the lines were run by Stata. Otherwise copy, paste and hit enter twice. This will link the do file with the folder structure in the selected location of your computer. You now will be able to use the chosen do file 7 - If you run all the do files in sequential order (as indicated by their names, starting with "0-3-food_standardize.do" and finishing with "1-1-integrate_datasets.do"), you will obtain the final datasets in the subfolder "1-CleanOutput" from the "Data" folder. 8 - The "run.do" file can produce either the files used in the poverty assessment (file "Somaliland Household Survey 2013 - Poverty Assesment.pdf" from the "Reports" subsection of the Microdata library), or the input files needed to carry out part of the analysis from the Somali High Frequency Survey (SHFS) 2016 Wave I. The "run.do" file contains a global macro in line 26 (global run2016vs2013 "1"). The default option "1" corresponds to producing the output files comparable to the SHFS 2016 Wave 1 for that analysis. If you change this option for "0" then you will obtain the output files "hh.dta" and "hhm.dta" used for the Somaliland 2013 poverty assessment in the "1-CleanOutput" subfolder. These will be identical to the 2 datasets from "Data in Stata" in the Microdata library whose name begins with "Output" 9 - Remember to always run "init.do" before any do file from the "Do" folder (as explained in step 6). Every do file has a short header stating its objective, and "run.do" contains the sequence of do files required to carry out all the analysis