-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy path5.Make-Report.do
74 lines (52 loc) · 2.15 KB
/
5.Make-Report.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
73
74
/*******************************************************************************
MAKE Report
This dofile runs all the Analysis dofiles.
*******************************************************************************/
* ==========================================
* PART 1. - Set Up
* ==========================================
* Stata set up
set more off
* Define machine-specific file path
/* Note : In order to define your own file path, enter your machine
username where it says "INSERT-MACHINE-USERNAME" and enter the file
path of your local toolkit folder where it says "INSERT MACHINE SPECIFIC
FILEPATH".
If you do not know what is your machine username, you can run the
following command into Stata:
dis "`c(username)'"
What is displayed in response is your machine username. To see all the
other computer and system parameters stored by Stata, you can run
creturn list
For more details on how the following chunk of code works (in particular
the if conditions and the global), see the extensive comment in the
dofile 0.Set-Up.do.
*/
if c(username)=="bl517" {
global root "C:/Users/bl517/Documents/Github/researched-pdp-toolkit"
}
else if c(username)=="INSERT-MACHINE-USERNAME" {
global root "INSERT MACHINE-SPECIFIC FILEPATH"
}
else {
di as err "Please enter machine-specific path information"
exit
}
* Load the paramaters
//the command do in Stata calls a dofile and runs it
quietly { //quietly ensures the code is run in the background without displaying any output
do "$root/1.Add-PDP-Data.do"
do "$root/2.3.Add-Pathway-Data.do"
do "$root/3.Define-Institution-Parameters.do"
}
* ==========================================
* PART 2. - Make Report
* ==========================================
/* Note : the command do in Stata calls a dofile and runs it. Thus, if you
run this whole dofile, it will call the dofiles listed below one by one
and run them. */
do "$root/0_scripts/1.1.Section1-Analysis.do"
do "$root/0_scripts/2.1.Section2-Analysis-OnePathway.do"
do "$root/0_scripts/2.2.Section2-Analysis-ShortTerm.do"
do "$root/0_scripts/3.1.Section3-Analysis"
do "$root/0_scripts/4.1.Section4-Analysis"