forked from zjl0714/lei_zhou_jop_2022
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path1_cross_country_analysis.do
132 lines (106 loc) · 4.56 KB
/
1_cross_country_analysis.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
*------------------------------PLEASE READ-------------------------------------*
/*
REPLICATION FILE FOR
FIGURE 1 & APPENDIX FIGURES A1 AND A2 IN
"PRIVATE RETUNRS TO PUBLIC INVESTMENT: POLITICAL CAREER INCENTIVES AND
INFRASTRUCTURE INVESTMENT IN CHINA"
IN THE JOURNAL OF POLITICS
AUTHOR: ZHENHUAN LEI & JUNLONG ZHOU
DATE: JULY 27, 2020
SOFTWARE: STATA 15.1 SE OPERATED ON WINDOWS 10
PACKAGE NEEDED: cleanplots
net install cleanplots, from("https://tdmize.github.io/data/cleanplots")
*/
*------------------------------CODE START HERE---------------------------------*
clear
* CHANGE TO YOUR DIRECTORY
cd "~/Dropbox/Research/Subway/0_subway_final/Replication files"
* Figure 1(a)
use rail.dta, clear
gen lgdp_per = log(gdp/ pop)
gen rail_share = rail / (0.91* gdp) * 100
gen rail2 = rail / 1000000000
twoway (lfitci rail_share lgdp_per) ///
(scatter rail_share lgdp_per if id != "CHN", mlabel(country) msymbol(o)) ///
(scatter rail_share lgdp_per if id == "CHN", mlabel(country) msymbol(T) msize(large)), ///
ytitle(Investment in Railway / GDP (%)) ///
xtitle(GDP per capita (log)) ///
title(Railway) ///
scheme(cleanplots) ///
ylabel(#5) ///
legend(off)
graph save rail, replace
* Appendix Figure A1 (a)
twoway (lfitci rail2 lgdp_per) ///
(scatter rail2 lgdp_per if id != "CHN", mlabel(country) msymbol(o)) ///
(scatter rail2 lgdp_per if id == "CHN", mlabel(country) msymbol(T) msize(large)), ///
ytitle(Total Investment in Railway (billion euro)) ///
xtitle(GDP per capita (log)) ///
title(Railway) ///
scheme(cleanplots) ///
ylabel(#5) ///
legend(off)
graph save rail_a1, replace
* Figure 1(b)
use road.dta, clear
gen lgdp_per = log(gdp/ pop)
gen road_share = road / (0.91* gdp) * 100
gen road2 = road / 1000000000
twoway (lfitci road_share lgdp_per) ///
(scatter road_share lgdp_per if id != "CHN", mlabel(country) msymbol(o)) ///
(scatter road_share lgdp_per if id == "CHN", mlabel(country) msymbol(T) msize(large)), ///
ytitle(Investment in Road / GDP (%)) ///
xtitle(GDP per capita (log)) ///
title(Road) ///
scheme(cleanplots) ///
ylabel(#5) ///
legend(off)
graph save road, replace
* Appendix Figure A1 (b)
twoway (lfitci road2 lgdp_per) ///
(scatter road2 lgdp_per if id != "CHN", mlabel(country) msymbol(o)) ///
(scatter road2 lgdp_per if id == "CHN", mlabel(country) msymbol(T) msize(large)), ///
ytitle(Total Investment in Road (billion euro)) ///
xtitle(GDP per capita (log)) ///
title(Road) ///
scheme(cleanplots) ///
ylabel(#5) ///
legend(off)
graph save road_a1, replace
* Merge (a) and (b) into Figure 1 and Appendix Figure A1
graph combine rail.gph road.gph, ///
graphregion(color(white) icolor(white) fcolor(white))
graph export Fig1.tif, replace
graph combine rail_a1.gph road_a1.gph, ///
graphregion(color(white) icolor(white) fcolor(white))
graph export FigA1.tif, replace
erase rail.gph
erase road.gph
erase rail_a1.gph
erase road_a1.gph
* Appendix Figure A2
use four_countries.dta, clear
gen road_share = road / gdp * 100
gen rail_share = rail / gdp * 100
twoway (scatter road_share year if country == "China", connect(l) ///
sort)(scatter road_share year if country == "Mexico", connect(l) ///
sort)(scatter road_share year if country == "India", connect(l) ///
sort)(scatter road_share year if country == "United States", connect(l) ///
sort), legend(label(1 "China") label(2 "Mexico") label (3 "India") ///
label(4 "United States")) xtitle(Year) ytitle("Investment in Road / GDP (%)") ///
scheme(s2mono) title(Road) graphregion(color(white) icolor(white) fcolor(white))
graph save road_4countries, replace
twoway (scatter rail_share year if country == "China", connect(l) ///
sort)(scatter rail_share year if country == "Mexico", connect(l) ///
sort)(scatter rail_share year if country == "India", connect(l) ///
sort)(scatter rail_share year if country == "United States", connect(l) ///
sort), legend(label(1 "China") label(2 "Mexico") label (3 "India") ///
label(4 "United States")) xtitle(Year) ytitle("Investment in Railway / GDP (%)") ///
scheme(s2mono) title(Railway) graphregion(color(white) icolor(white) fcolor(white))
graph save rail_4countries, replace
graph combine rail_4countries.gph road_4countries.gph, ///
iscale(0.72) scheme(sj) graphregion(color(white) icolor(white) fcolor(white)) ///
note(Data sources: OECD and World Bank)
graph export FigA2.tif, replace
erase rail_4countries.gph
erase road_4countries.gph