-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrun_dissertation.do
165 lines (163 loc) · 7.71 KB
/
run_dissertation.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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
import excel "C:\Users\thanh\OneDrive - University of Leeds\Desktop\dissertation\panel data.xlsx", sheet("panel data") firstrow
encode n, gen(n1)
xtset n1 t
gen lnwage=ln(wage)
gen lnunem= ln(Unemployed)
gen lnDP=lnDep*lnPCI
gen lnDM=lnDep*lnMigration
gen LFP=lnPFDI*lnPCI
gen LFHC=lnPFDI*lnHC
reg lnPGDP lnPDI lnPFDI lnTO lnHC lnMigration DE lnUrbanisation lnDep lnPCI//github.com/POLS
reg lnPGDP lnPDI lnPFDI lnTO lnHC lnMigration DE lnUrbanisation lnDep lnPCI lnDP
xtreg lnPGDP lnPFDI lnPDI lnTO lnHC lnMigration DE lnUrbanisation lnDep lnPCI lnDP//github.com/random effects
xttest0//github.com/Breusch-Pagan test
xtivreg lnPGDP lnPDI lnTO lnHC lnMigration DE lnUrbanisation lnDep lnPCI lnDP (lnPFDI = L.lnPGDP L.lnPFDI lnTO L.lnTO lnPDI L.lnPDI lnHC L.lnHC lnDep L.lnDep lnwage lnMigration L.lnMigration lnUrbanisation L.lnUrbanisation DE lnPCI)//github.com/IV-1
hausman, save
xtreg lnPGDP lnPFDI lnPDI lnTO lnHC lnMigration DE lnUrbanisation lnDep lnPCI lnDP
hausman, sigmamore
//github.com/Hausman test
ssc install xtoverid
xtivreg lnPGDP lnPDI lnTO lnHC lnMigration DE lnUrbanisation lnDep lnPCI lnDP (lnPFDI = L.lnPGDP L.lnPFDI lnTO L.lnTO lnPDI L.lnPDI lnHC L.lnHC lnDep L.lnDep lnwage lnMigration L.lnMigration lnUrbanisation L.lnUrbanisation DE lnPCI)
xtoverid, robust cluster(n1)//github.com/Sargan test
clear
//github.com/Shapley value decomposition
import excel "C:\Users\thanh\OneDrive - University of Leeds\Desktop\dissertation\panel data.xlsx", sheet("2015") firstrow
reg PGDP PDI PFDI TO HC DE Migration Urbanisation Dep PCI
foreach v of var * {
drop if missing(`v')
}
db rbdineq
rbdineq PGDP, indcon(PDI PFDI TO HC DE Migration Urbanisation Dep PCI) hsize(pop) dregres(0)
cap ssc install ineqdec0
ineqdec0 PGDP//github.com/inequality indices
ineqdec0 PFDI
clear
import excel "C:\Users\thanh\OneDrive - University of Leeds\Desktop\dissertation\panel data.xlsx", sheet("2016") firstrow
foreach v of var * {
drop if missing(`v')
}
db rbdineq
rbdineq PGDP, indcon(PDI PFDI TO HC DE Migration Urbanisation Dep PCI) hsize(pop) dregres(0)
cap ssc install ineqdec0
ineqdec0 PGDP
ineqdec0 PFDI
clear
import excel "C:\Users\thanh\OneDrive - University of Leeds\Desktop\dissertation\panel data.xlsx", sheet("2017") firstrow
foreach v of var * {
drop if missing(`v')
}
db rbdineq
rbdineq PGDP, indcon(PDI PFDI TO HC DE Migration Urbanisation Dep PCI) hsize(pop) dregres(0)
cap ssc install ineqdec0
ineqdec0 PGDP
ineqdec0 PFDI
clear
import excel "C:\Users\thanh\OneDrive - University of Leeds\Desktop\dissertation\panel data.xlsx", sheet("2018") firstrow
foreach v of var * {
drop if missing(`v')
}
db rbdineq
rbdineq PGDP, indcon(PDI PFDI TO HC DE Migration Urbanisation Dep PCI) hsize(pop) dregres(0)
cap ssc install ineqdec0
ineqdec0 PGDP
ineqdec0 PFDI
clear
import excel "C:\Users\thanh\OneDrive - University of Leeds\Desktop\dissertation\panel data.xlsx", sheet("2019") firstrow
foreach v of var * {
drop if missing(`v')
}
db rbdineq
rbdineq PGDP, indcon(PDI PFDI TO HC DE Migration Urbanisation Dep PCI) hsize(pop) dregres(0)
cap ssc install ineqdec0
ineqdec0 PGDP
ineqdec0 PFDI
clear
import excel "C:\Users\thanh\OneDrive - University of Leeds\Desktop\dissertation\panel data.xlsx", sheet("2020") firstrow
foreach v of var * {
drop if missing(`v')
}
db rbdineq
rbdineq PGDP, indcon(PDI PFDI TO HC DE Migration Urbanisation Dep PCI) hsize(pop) dregres(0)
cap ssc install ineqdec0
ineqdec0 PGDP
ineqdec0 PFDI
clear
import excel "C:\Users\thanh\OneDrive - University of Leeds\Desktop\dissertation\panel data.xlsx", sheet("2021") firstrow
foreach v of var * {
drop if missing(`v')
}
db rbdineq
rbdineq PGDP, indcon(PDI PFDI TO HC DE Migration Urbanisation Dep PCI) hsize(pop) dregres(0)
cap ssc install ineqdec0
ineqdec0 PGDP
ineqdec0 PFDI
clear
import excel "C:\Users\thanh\OneDrive - University of Leeds\Desktop\dissertation\panel data.xlsx", sheet("2022") firstrow
foreach v of var * {
drop if missing(`v')
}
db rbdineq
rbdineq PGDP, indcon(PDI PFDI TO HC DE Migration Urbanisation Dep PCI) hsize(pop) dregres(0)
cap ssc install ineqdec0
ineqdec0 PGDP
ineqdec0 PFDI
clear
//github.com/Economic growth theory
import excel "C:\Users\thanh\OneDrive - University of Leeds\Desktop\dissertation\panel data.xlsx", sheet("panel data") firstrow
encode n, gen(n1)
xtset n1 t
rename n1 province
by province: gen popgrowth=ln(pop)-ln(pop[_n-1])
gen x1= popgrowth+0.05
gen lngrow=ln(popgrowth)
//github.com/g+delta=0.05 (sum of tech growth rate and capital depreciation)
gen lnx1=ln(x1)
generate newvar1 = lnPGDP-L.lnPGDP
//github.com/Absolute convergence
reg newvar1 L.lnPGDP
xtreg newvar1 L.lnPGDP
testparm L.lnPGDP
display -ln(1+_b[L.lnPGDP])//github.com/convergence speed
display ln(0.5)/ln(1+_b[L.lnPGDP])//half-life time
//github.com/Conditional convergence
xtreg newvar1 L.lnPGDP lns1 lnx1 DE
xtreg newvar1 L.lnPGDP lns1 lnx1 DE lnPFDI
//github.com/hausman test
xtivreg newvar1 L.lnPGDP lns1 lnx1 DE (lnPFDI = L.lnPGDP L.lnPFDI lnTO L.lnTO lnPDI L.lnPDI lnHC L.lnHC lnDep L.lnDep lnwage lnMigration L.lnMigration lnUrbanisation L.lnUrbanisation DE lnPCI)
hausman, save
xtreg newvar1 L.lnPGDP lns1 lnx1 DE lnPFDI
hausman
//github.com/Sargan test
xtivreg newvar1 L.lnPGDP lns1 lnx1 DE (lnPFDI = L.lnPGDP L.lnPFDI lnTO L.lnTO lnPDI L.lnPDI lnHC L.lnHC lnDep L.lnDep lnwage lnMigration L.lnMigration lnUrbanisation L.lnUrbanisation DE lnPCI)
xtoverid, robust cluster(province)
//github.com/
xtreg newvar1 L.lnPGDP lns1 lnx1 lnTO lnHC lnMigration DE lnUrbanisation lnDep lnPCI lnPFDI lnDP
xtivreg newvar1 L.lnPGDP lns1 lnx1 lnTO lnHC lnMigration DE lnUrbanisation lnDep lnPCI lnDP (lnPFDI = L.lnPGDP L.lnPFDI lnTO L.lnTO lnPDI L.lnPDI lnHC L.lnHC lnDep L.lnDep lnwage lnMigration L.lnMigration lnUrbanisation L.lnUrbanisation DE lnPCI)
//github.com/Hausman
xtivreg newvar1 L.lnPGDP lns1 lnx1 lnTO lnHC lnMigration DE lnUrbanisation lnDep lnPCI lnDP (lnPFDI = L.lnPGDP L.lnPFDI lnTO L.lnTO lnPDI L.lnPDI lnHC L.lnHC lnDep L.lnDep lnwage lnMigration L.lnMigration lnUrbanisation L.lnUrbanisation DE lnPCI)
hausman, save
xtreg newvar1 L.lnPGDP lns1 lnx1 lnTO lnHC lnMigration DE lnUrbanisation lnDep lnPCI lnPFDI lnDP
hausman, sigmamore
//github.com/Half-life time/conditional
xtreg newvar1 L.lnPGDP lns1 lnx1 DE
display -ln(1+_b[L.lnPGDP])//github.com/convergence speed
display ln(0.5)/ln(1+_b[L.lnPGDP])//half-life time
xtreg newvar1 L.lnPGDP lns1 lnx1 DE lnPFDI
display -ln(1+_b[L.lnPGDP])//github.com/convergence speed
display ln(0.5)/ln(1+_b[L.lnPGDP])//half-life time
xtivreg newvar1 L.lnPGDP lns1 lnx1 DE (lnPFDI = L.lnPGDP L.lnPFDI lnTO L.lnTO lnPDI L.lnPDI lnHC L.lnHC lnDep L.lnDep lnwage lnMigration L.lnMigration lnUrbanisation L.lnUrbanisation DE lnPCI)
display -ln(1+_b[L.lnPGDP])//github.com/convergence speed
display ln(0.5)/ln(1+_b[L.lnPGDP])//half-life time
xtreg newvar1 L.lnPGDP lns1 lnx1 lnTO lnHC lnMigration DE lnUrbanisation lnDep lnPCI lnPFDI, robust
display -ln(1+_b[L.lnPGDP])//github.com/convergence speed
display ln(0.5)/ln(1+_b[L.lnPGDP])//half-life time
xtivreg newvar1 L.lnPGDP lns1 lnx1 lnTO lnHC lnMigration DE lnUrbanisation lnDep lnPCI lnDP (lnPFDI = L.lnPGDP L.lnPFDI lnTO L.lnTO lnPDI L.lnPDI lnHC L.lnHC lnDep L.lnDep lnwage lnMigration L.lnMigration lnUrbanisation L.lnUrbanisation DE lnPCI)
//github.com/sensitivity analysis
//github.com/running IV models sensitive to time dummies with t1==1 as
xtivreg lnPGDP lnPDI lnTO lnHC lnMigration DE lnUrbanisation lnDep lnPCI lnDP t1 (lnPFDI = L.lnPGDP L.lnPFDI lnTO L.lnTO lnPDI L.lnPDI lnHC L.lnHC lnDep L.lnDep lnwage lnMigration L.lnMigration lnUrbanisation L.lnUrbanisation DE lnPCI)//github.com/IV-0
asdoc xtivreg newvar1 L.lnPGDP lns1 lnx1 lnTO lnHC lnMigration DE lnUrbanisation lnDep lnPCI lnDP (lnPFDI = L.lnPGDP L.lnPFDI lnTO L.lnTO lnPDI L.lnPDI lnHC L.lnHC lnDep L.lnDep lnwage lnMigration L.lnMigration lnUrbanisation L.lnUrbanisation DE lnPCI), nested//github.com/IV-3
gen id=_n
graph box PGDP, mark(1,mlabel(id))
graph box PFDI, mark(1,mlabel(id))
//github.com/hausman
xtivreg newvar1 L.lnPGDP lns1 lnx1 lnTO lnHC lnMigration DE lnUrbanisation lnDep lnPCI lnDP (lnPFDI = L.lnPGDP L.lnPFDI L.lnHC L.lnDep lnwage L.lnMigration L.lnUrbanisation)