-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy path_SDI_Makedata_Master.do
72 lines (50 loc) · 2.29 KB
/
_SDI_Makedata_Master.do
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
/*
Master file for creating vignette data from SDIs
Author: Anna Konstantinova
Last edited: May 3rd, 2018
*/
****************************************************************************
* Options
****************************************************************************
* Enter the path to the root directory:
global root ///
"C:\Users\annak\Documents\GitHub\SDI-Health"
* Enter the list of countries to analyze:
global theCountries ///
`" "Kenya-2012" "Madagascar-2016" "Nigeria-2013" "Tanzania-2014" "Tanzania-2016" "Uganda-2013" "Mozambique-2014" "Niger-2015" "Senegal-2010" "Togo-2013" "'
****************************************************************************
* Step 1. Setup –– DO NOT EDIT BELOW THIS LINE
****************************************************************************
qui {
clear all
set more off
cap cd "$root"
if _rc!=0 noi di as err "Please enter machine-specific root folder in SDI Master Do-file!"
global do "$root/scripts"
global raw "$root/rawData"
global clean "$root/cleanData"
global metadata "$root/metaData"
global harmonized "$root/harmonizedData"
cap ssc install findname
cap net install "https://raw.githubusercontent.com/worldbank/stata/master/wb_git_install/wb_git_install.pkg"
cap wb_git_install applyCodebook
qui do "$do/ado/applyCodebook.ado"
}
****************************************************************************
* Step 2. Clean SDI data according to instructions in MANUAL
****************************************************************************
foreach place in $theCountries {
display "Cleaning `place'..."
qui do "$do/cleaning/Infrastructure-Module1/clean_module1_`place'_SDI.do"
qui do "$do/cleaning/Roster-Module2/clean_module2_`place'_SDI.do"
qui do "$do/cleaning/Vignettes-Module3/clean_module3_`place'_SDI.do"
display "`place' data cleaned!"
}
****************************************************************************
* Step 3. Harmonize modules
****************************************************************************
qui do "$do/harmonization/harmonize_vignettes.do"
qui do "$do/harmonization/harmonize_absenteeism.do"
qui do "$do/harmonization/harmonize_facilities.do"
clear
* Have a lovely day!