File size: 7,918 Bytes
2704016
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
*********************************************************************************************************
**** Figure C.1. Yearly effects of connections : Entry vs. Re-entry 
*********************************************************************************************************


use Data\NationalCntyYr.dta,clear



********************************************************************************
********** gen interactions


gen nhXZenghu_all_invdist=nonhunan*Zenghu_all_invdist
gen hXZenghu_all_invdist=hunan*Zenghu_all_invdist

gen nhXZeng_all0_invdist=nonhunan*Zeng_all0_invdist
gen hXZeng_all0_invdist=hunan*Zeng_all0_invdist


foreach x of varlist hunan  Zenghu_all_invdist   Zeng_all0_invdist Zeng_all0_invdist_pc  invdist0_L1 invdist0_F1    Zeng_exam0_invdist  Zeng_Extraexam_invdist   Zeng_BMF_invdist    Zeng_juren0_invdist  nhXZenghu_all_invdist nhXZeng_all0_invdist  hXZenghu_all_invdist hXZeng_all0_invdist{
gen `x'Xperiod1=`x'*period1
gen `x'Xperiod2=`x'*period2
gen `x'Xperiod=`x'*period

}


foreach x of varlist  lnurbanpop prefcap lnjinshi lncntyquota0 lncntypop lncntyarea  mainriv dist2canal lnrice lnwheat dist_nanjing Taiping_route1 {
gen `x'Xperiod1=`x'*period1
gen `x'Xperiod2=`x'*period2
gen `x'Xperiod=`x'*period

}


foreach x of varlist  lnurbanpop prefcap lnjinshi lncntyquota0 lncntypop lncntyarea  mainriv dist2canal lnrice lnwheat dist_nanjing  Taiping_route1 {
gen h`x'Xperiod1=hunan*`x'*period1
gen h`x'Xperiod2=hunan*`x'*period2
gen h`x'Xperiod=hunan*`x'*period
}




********************************************************************************
********** gen year dummy & interactions


drop if year==.
tab year, gen(year)


foreach x of varlist year2-year111 {
gen hunanX`x'=hunan*`x'


}


***************************************************************
foreach x of varlist year2-year111 {
gen Zeng_all0_invdistX`x'=Zeng_all0_invdist*`x'
}

********
foreach x of varlist year2-year111 {
gen hXZeng_all0_invdistX`x'=hXZeng_all0_invdist*`x'
}


********
foreach x of varlist year2-year111 {
gen nhXZeng_all0_invdistX`x'=nhXZeng_all0_invdist*`x'
}


***************************************************************
foreach x of varlist year2-year111 {
gen Zenghu_all_invdistX`x'=Zenghu_all_invdist*`x'
}

********
foreach x of varlist year2-year111 {
gen hXZenghu_all_invdistX`x'=hXZenghu_all_invdist*`x'
}


********
foreach x of varlist year2-year111 {
gen nhXZenghu_all_invdistX`x'=nhXZenghu_all_invdist*`x'
}



********************************************************************************


reghdfe entry hXZeng_all0_invdistXyear22-hXZeng_all0_invdistXyear111  Zeng_all0_invdistXyear22-Zeng_all0_invdistXyear111     lnurbanpopXperiod-Taiping_route1Xperiod  , absorb(year samcntyid ) cluster(prefid )


parmest, saving( Results\ConnectionOnEntry_all0_yearly_0, replace)


reghdfe reentry hXZeng_all0_invdistXyear22-hXZeng_all0_invdistXyear111  Zeng_all0_invdistXyear22-Zeng_all0_invdistXyear111     lnurbanpopXperiod-Taiping_route1Xperiod  , absorb(year samcntyid  ) cluster(prefid )


parmest, saving( Results\ConnectionOnRentry_all0_yearly_0, replace)
 



preserve

**************
 
use Results\ConnectionOnSenior_all0_yearly_02, clear
 

gen i=_n
keep if i<=91
gen time=i


gen zero=0
label var zero "the effect = 0"
label var estimate "the coefficent of logged total deaths"

keep time max95 min95 time estimate zero


replace time=1820+time
replace time=1820 if time==1911
 

foreach x of varlist estimate   {
replace `x'=0 if  time==1820
}

foreach x of varlist   max95 min95  {
replace `x'=0 if  time==1820
}


gen year=time 

****
sort time
label var time "Year"
 
sum estimate if year<=1849
gen bench=r(mean)

 
***** 
twoway  (rarea max95 min95 time, lstyle(ci)  msize(tiny) fc(gs12) c(none) lc(gs12))   (connect estimate time, msize(vsmall) lp(solid) lw(medthick) lc(gs7)  xline(1850, lpattern(dash) lcolor(blue))  xline(1853, lpattern(solid) lcolor(blue)) xline(1864, lpattern(dash) lcolor(blue)) ) (line zero time , lp(dash) lw(medthick) lc(gs0) )   /// 
, leg(region(lp(blank)) rows(3))   title("A. All officials", size(medium) )  xlabel(1820(30)1910) ylabel(-0.2(0.2)0.4)   legend(order(1 "95% CI" 2 "Effects of connections * Hunan" ) row(2) region(color(none)))  graphregion(color(white) ifcolor(white) ilcolor(white) fcolor(white)) saving("Results\AllCnty_hXconn_all0_yearly_A_0.gph", replace) xsize(3) ysize(3)
 
restore 


*********************************** New  entry

preserve

**************
 
use Results\ConnectionOnEntry_all0_yearly_0, clear


gen i=_n
keep if i<=91
gen time=i

gen zero=0
label var zero "the effect = 0"
label var estimate "the coefficent of logged total deaths"

keep time max95 min95 time estimate zero


replace time=1820+time
replace time=1820 if time==1911
 

foreach x of varlist estimate   {
replace `x'=0 if  time==1820
}

foreach x of varlist   max95 min95  {
replace `x'=0 if  time==1820
}


gen year=time 

****
sort time
label var time "Year"
 
sum estimate if year<=1849
gen bench=r(mean)

 
***** 
twoway  (rarea max95 min95 time, lstyle(ci)  msize(tiny) fc(gs12) c(none) lc(gs12))   (connect estimate time, msize(vsmall) lp(solid) lw(medthick) lc(gs7)  xline(1850, lpattern(dash) lcolor(blue))  xline(1853, lpattern(solid) lcolor(blue)) xline(1864, lpattern(dash) lcolor(blue)) ) (line zero time , lp(dash) lw(medthick) lc(gs0) )   /// 
, leg(region(lp(blank)) rows(3))   title("B. Newly promoted", size(medium) )  xlabel(1820(30)1910) ylabel(-0.2(0.2)0.4)   legend(order(1 "95% CI" 2 "Effects of connections * Hunan" ) row(2) region(color(none)))  graphregion(color(white) ifcolor(white) ilcolor(white) fcolor(white)) saving("Results\AllCnty_hXconn_all0_yearly_Entry_0.gph", replace) xsize(3) ysize(3)
 
restore 




*********************************** RE  entry

preserve

**************
 
use Results\ConnectionOnRentry_all0_yearly_0, clear


gen i=_n
keep if i<=91
gen time=i


gen zero=0
label var zero "the effect = 0"
label var estimate "the coefficent of logged total deaths"

keep time max95 min95 time estimate zero


replace time=1820+time
replace time=1820 if time==1911
 

foreach x of varlist estimate   {
replace `x'=0 if  time==1820
}

foreach x of varlist   max95 min95  {
replace `x'=0 if  time==1820
}


gen year=time 

****
sort time
label var time "Year"

 
sum estimate if year<=1849
gen bench=r(mean)

 
***** 
twoway  (rarea max95 min95 time, lstyle(ci)  msize(tiny) fc(gs12) c(none) lc(gs12))   (connect estimate time, msize(vsmall) lp(solid) lw(medthick) lc(gs7)  xline(1850, lpattern(dash) lcolor(blue))  xline(1853, lpattern(solid) lcolor(blue)) xline(1864, lpattern(dash) lcolor(blue)) ) (line zero time , lp(dash) lw(medthick) lc(gs0) )   /// 
, leg(region(lp(blank)) rows(3))   title("C. Re-promoted", size(medium) )  xlabel(1820(30)1910) ylabel(-0.2(0.2)0.4)   legend(order(1 "95% CI" 2 "Effects of connections * Hunan" ) row(2) region(color(none)))  graphregion(color(white) ifcolor(white) ilcolor(white) fcolor(white)) saving("Results\AllCnty_hXconn_all0_yearly_Rentry_0.gph", replace) xsize(3) ysize(3)
 
restore 





*********************************************************************************************************
************************************************** Yearly effect of connections all, newly promoted, and re-promoted 
************************************************** 

graph combine  Results\AllCnty_hXconn_all0_yearly_A_0.gph  Results\AllCnty_hXconn_all0_yearly_Entry_0.gph Results\AllCnty_hXconn_all0_yearly_Rentry_0.gph, row(1) xsize(9) ysize(4.5) graphregion(color(white) ifcolor(white) ilcolor(white) fcolor(white))

graph export Results\Figure_C1.png, replace