-
Notifications
You must be signed in to change notification settings - Fork 0
/
00_master.do
105 lines (79 loc) · 2.41 KB
/
00_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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
********************************************************************************
* Master
********************************************************************************
clear all
set more off
set graph off
* define project-path
if "`c(username)'" == "Fabian" {
global mypath "/Users/Fabian/OneDrive/Studium/Seminar/"
global soep "/Users/Fabian/Documents/DATA/STATA/SOEP_v33.1/SOEP_wide/"
global pretest "/Users/Fabian/Documents/DATA/STATA/pretest/"
}
else if "`c(username)'" == "avila" {
global mypath "/home/avila/Documents/Projects/WS1819_FU/MeasuringInequality/stata/"
global soep "/data/DatasetsSOEP/SOEP_v33.1/SOEP_wide/"
global pretest "/data/DatasetsSOEP/pretest/"
}
else if "`c(username)'" == "Tobias?" {
global mypath "path"
global soep "path"
global pretest "path"
}
else if "`c(username)'" == "Sebastian?" {
global mypath "path"
global soep "path"
global pretest "path"
}
* globals of further paths
global do "${mypath}do/"
global outpath "${mypath}outpath/"
global graphs "${outpath}graphs/"
global tables "${outpath}tables/"
if "`c(username)'" == "Fabian" {
global outpath "/Users/Fabian/Documents/DATA/STATA/"
}
* create folders if not existing
foreach dir in outpath graphs tables {
if "`dir'" == "outpath" {
capture confirm file "${mypath}`dir'"
if _rc mkdir "${mypath}`dir'/"
}
else {
capture confirm file "${outpath}`dir'"
if _rc mkdir "${outpath}`dir'/"
}
}
* display all generated scalars
global show_all "TRUE"
***
*** I: Data Preparation
* 1. SOEP, Pretest data preparation
do "${do}01_prep_data.do"
* 2. preparation of weights (Pretest)
do "${do}02_prep_weights.do"
* 3. preparation of variables used for pareto distribution
do "${do}03_prep_pareto.do"
* 4. preparation of mi impute dataset
do "${do}04_prep_mi_impute_dataset.do"
*** II: Descriptive Statistics and Graphs
* 5. descriptive statistics
do "${do}05_descriptive_stats.do"
* 6. additional graphs
do "${do}06_descriptive_graphs.do"
*** III: Analysis
* 7. fitting pareto distribution and predict top percentiles of SOEP
do "${do}07_fitting_pareto.do"
* 8. Robustness Checks
do "${do}08_robustness_checks.do"
* 9. Impute Top-Tails of SOEP
do "${do}09_impute_top_percentiles.do"
* 10. threshold-alhpa-relation
do "${do}10_threshold_alpha.do"
*** IV: Data Export
* 11. Exporting scalars as tables
do "${do}11_scalars_to_table.do"
* 12. Pareto Graphs
do "${do}12_pareto_graphs.do"
set graph on
***