-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path8_RobustnessTests.do
559 lines (457 loc) · 22.9 KB
/
8_RobustnessTests.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
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
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
* ------------------------------------------------------------------------
* Daniel Kaufmann, "Is Deflation Costly After All? The Perils of Erroneous
* Historical Classifications," Journal of Applied Econometrics, forthcoming
* ------------------------------------------------------------------------
*
* Computes the robustness tests
*
* ------------------------------------------------------------------------
* Daniel Kaufmann, 2020, daniel.kaufmann@unine.ch
* ------------------------------------------------------------------------
version 15
capture log close
clear
clear matrix
program drop _all
clear mata
cls
set more off
pause off
* Adjust this path to where you stored the files
global path = "C:\Users\kaufmannd\switchdrive\Research\TrendInflation\submissions\JAE\HistoricalInflation_Replication"
* Set up paths for storing results
global respath = "$path\Results\"
global datpath = "$path\Data\"
global figpath = "$path\Results\"
global funcpath = "$path\Functions\"
sysdir set PLUS $path\Functions\ado\plus
cd $path
*-------------------------------------------------------------------------------
* Import data and do settings
*-------------------------------------------------------------------------------
import excel $datpath/DataForStataUS.xlsx, first
duplicates report date
isid date
tsset date, yearly
* Dummy variables
gen cpi_dum = 0
replace cpi_dum = 1 if cpi<0
replace cpi_dum = . if cpi == .
gen prx_dum = 0
replace prx_dum = 1 if proxy<0
replace prx_dum = . if proxy == .
gen bank_dum = bank
gen share_dum = 0
replace share_dum = 1 if share<0
replace share_dum = . if share==.
gen mon_dum = 0
replace mon_dum = 1 if m2<5
replace mon_dum = . if m2==.
gen prx2_dum = 0
replace prx2_dum = 1 if cpif<0
replace prx2_dum = . if cpif== .
* For robustness different threshold and persistence
gen cpi_dum3 = 0
replace cpi_dum3 = 1 if cpi<-3
replace cpi_dum3 = . if cpi == .
gen prx_dum3 = 0
replace prx_dum3 = 1 if proxy<-3
replace prx_dum3 = . if proxy == .
gen cpi_dum1 = 0
replace cpi_dum1 = 1 if cpi<1
replace cpi_dum1 = . if cpi == .
gen prx_dum1 = 0
replace prx_dum1 = 1 if proxy<1
replace prx_dum1 = . if proxy == .
gen cpi_dump = 0
replace cpi_dump = 1 if cpi_dum[_n-1]==1 & cpi_dum[_n] == 1
replace cpi_dump = 1 if cpi_dum[_n]==1 & cpi_dum[_n+1] == 1
gen prx_dump = 0
replace prx_dump = 1 if prx_dum[_n-1]==1 & prx_dum[_n] == 1
replace prx_dump = 1 if prx_dum[_n]==1 & prx_dum[_n+1] == 1
/*Settings*/
gen yt = iprod
gen xt = cpi_dum
gen zt = prx_dum
gen qt = .
gen gt = prx2_dum
gen dSample = 0
replace dSample = 1 if date <= 1899 & date >= 1800
local maxIter = 500
local maxTry = 3
local fixE00 = 0.15
local fixN11 = 0.15
/*Settings end*/
*-------------------------------------------------------------------------------
* Main Table IPROD, with controls (Bounds and GMM)
*-------------------------------------------------------------------------------
* Country and depVar label for saving coefficients
* Note: Set qt = 0 (scalar) for estimation without covariates
local cty = ""
eststo clear
disp("Main results United States")
foreach coVar in "bank_dum" "share_dum" {
replace yt = iprod
replace qt = `coVar'
* OLS CPI
*EstimateBinaryOLS yt xt qt 0 dSample "CPI" "`coVar'" "`cty'"
* Black et al. CPI and proxy
*EstimateBinaryBlack yt xt zt qt 0 dSample "CPI, proxy" "`coVar'" "`cty'"
* GMM conditional independence
EstimateBinaryIndep yt xt zt qt dSample `maxIter' `maxTry' "CPI, proxy" "`coVar'" "`cty'"
* IV CPI and proxy
*EstimateBinaryIV yt xt zt qt 0 dSample "CPI, proxy" "`coVar'" "`cty'"
* GMM fixed misclassification
EstimateBinaryFixed yt xt zt qt dSample `fixE00' `fixN11' `maxIter' `maxTry' "CPI, proxy" "`coVar'" "`cty'"
}
* Do estimates of bounds with all covariates
* ------------ Black et al, unconstrained --------------
* Generate deflation indicators
gen m00 = (1-xt)*(1-zt)
gen m10 = xt*(1-zt)
gen m01 = (1-xt)*zt
gen m11 = xt*zt
ivreg2 yt xt share_dum bank_dum mon_dum if dSample == 1, robust bw(2)
eststo mod1usall: nlcom (a: _b[_cons]) ///
(b: _b[xt]) ///
(ab: _b[_cons]+_b[xt]) ///
(d2: _b[share_dum]) (d1: _b[bank_dum]) (d3: _b[mon_dum]), post
estadd scalar Converge = 1
estadd local Bound "Upper"
estadd local Method "OLS"
estadd local Indicator "CPI, proxy"
estadd local DepVar ""
ivreg2 yt m11 share_dum bank_dum mon_dum m10 m01 if dSample == 1, robust bw(2)
eststo mod2usall: nlcom (a: _b[_cons]) ///
(b: _b[m11]) ///
(ab: _b[_cons]+_b[m11]) ///
(d2: _b[share_dum]) (d1: _b[bank_dum])(d3: _b[mon_dum]), post
estadd scalar Converge = 1
estadd local Bound "Upper"
estadd local Method "OLS"
estadd local Indicator "CPI, proxy"
estadd local DepVar ""
ivreg2 yt m11 share_dum bank_dum m10 m01 if dSample == 1, robust bw(2)
eststo mod20usall: nlcom (a: _b[_cons]) ///
(b: _b[m11]) ///
(ab: _b[_cons]+_b[m11]) ///
(d2: _b[share_dum]) (d1: _b[bank_dum]), post
estadd scalar Converge = 1
estadd local Bound "Upper"
estadd local Method "OLS"
estadd local Indicator "CPI, proxy"
estadd local DepVar ""
drop m0* m1*
esttab mod2* mod3* mod5* , keep(a* b* d*) drop(bias* ab*) noomitted ///
title("United States, 1800-1899, IPROD, with controls") ///
stats(N Bound Method Indicator sOverident pOverident pDiff nTries Converge maxIter , fmt(0 0 0 0 2 3 2 0 0 0)) ///
se(2) r2(2) b(2) star(* 0.10 ** 0.05 *** 0.01) ///
refcat(a "Model parameters" biasXa "Bias estimates", nolabel) ///
rename(abank_dum a ashare_dum a amon_dum a bbank_dum b bshare_dum b bmon_dum b share_dum d2 bank_dum d1 dbank_dum d1 dshare_dum d2) ///
coeflabels(pOverident "\emph{p}-value \emph{J}-test" a "Growth inflation" b "Shortfall deflation" d3 "M2 slowdown" d1 "Banking crisis" d2 "Stock price decline" dshare_dum "Stock price decline" dmon_dum "Money growth decline")
esttab mod2* mod3* mod5* using $respath/Tab_D1.txt, replace keep(a* b* d*) drop(bias* ab*) mlabels(none) collabels(none) nomtitles nolegend nonumbers label noomitted ///
stats(N Bound Method Indicator sOverident pOverident pDiff nTries Converge maxIter , fmt(0 0 0 0 2 3 2 0 0 0)) ///
se(2) r2(2) b(2) star(* 0.10 ** 0.05 *** 0.01) ///
refcat(a "Model parameters" biasXa "Bias estimates", nolabel) ///
rename(abank_dum a ashare_dum a amon_dum a bbank_dum b bshare_dum b bmon_dum b share_dum d2 bank_dum d1 dbank_dum d1 dshare_dum d2) ///
coeflabels(pOverident "\emph{p}-value \emph{J}-test" a "Growth inflation" b "Shortfall deflation" d3 "M2 slowdown" d1 "Banking crisis" d2 "Stock price decline" dbank_dum "Banking crisis" dshare_dum "Stock price decline" dmon_dum "Money growth decline")
*-------------------------------------------------------------------------------
* Robustness Table
*-------------------------------------------------------------------------------
* Country and depVar label for saving coefficients
* Note: Set qt = 0 (scalar) for estimation without covariates
local cty = ""
local depName = ""
eststo clear
* Severe deflations
replace yt = iprod
replace xt = cpi_dum3
replace zt = prx_dum3
* OLS CPI
EstimateBinaryOLS yt xt 0 0 dSample "CPI" "`depName'" "`cty'"
* Black et al. CPI and proxy
EstimateBinaryBlack yt xt zt 0 0 dSample "CPI, proxy" "`depName'" "`cty'"
* GMM conditional independence
EstimateBinaryIndep yt xt zt 0 dSample `maxIter' `maxTry' "CPI, proxy" "`depName'" "`cty'"
* IV CPI and proxy
EstimateBinaryIV yt xt zt 0 0 dSample "CPI, proxy" "`depName'" "`cty'"
* GMM fixed misclassification
EstimateBinaryFixed yt xt zt 0 dSample `fixE00' `fixN11' `maxIter' `maxTry' "CPI, proxy" "`depName'" "`cty'"
esttab mod1* mod2* mod3* mod4* mod5*, keep(a b) noomitted ///
title("United States, 1800-1899, IPROD, no controls") ///
stats(N Bound Method Indicator sOverident pOverident nTries Converge maxIter , fmt(0 0 0 0 2 3 0 0 0)) ///
se(2) r2(2) b(2) star(* 0.10 ** 0.05 *** 0.01) ///
refcat(a "Model parameters" biasXa "Bias estimates", nolabel) ///
coeflabels(a "\$\alpha = E[y|\pi>0]$" b "\$\beta = E[y|\pi<0]-E[y|\pi>0]$" ab "\$\alpha+\beta = E[y|\pi<0]$" pd "\$P[\pi<0]$" ///
biasXa "\$plim\ \hat\alpha-\alpha$" biasXb "\$plim\ \hat\beta-\beta$" biasXab "\$plim\ \hat\alpha+\hat\beta-\alpha-\beta$")
esttab mod1* mod2* mod3* mod4* mod5* using $respath/Tab_D3A.txt, replace keep(a b) mlabels(none) collabels(none) nomtitles nolegend nonumbers label noomitted ///
stats(N Bound Method Indicator sOverident pOverident nTries Converge maxIter , fmt(0 0 0 0 2 3 0 0 0)) ///
se(2) r2(2) b(2) star(* 0.10 ** 0.05 *** 0.01) ///
refcat(a "\textbf{Model parameters:}" biasXa "\textbf{Bias estimates:}", nolabel) ///
coeflabels(a "\$\alpha = E[y|\pi>0]$" b "\$\beta = E[y|\pi<0]-E[y|\pi>0]$" ab "\$\alpha+\beta = E[y|\pi<0]$" pd "\$P[\pi<0]$" ///
biasXa "\$plim\ \hat\alpha-\alpha$" biasXb "\$plim\ \hat\beta-\beta$" biasXab "\$plim\ \hat\alpha+\hat\beta-\alpha-\beta$")
* Persistent deflation
replace yt = iprod
replace xt = cpi_dump
replace zt = prx_dump
* OLS CPI
EstimateBinaryOLS yt xt 0 0 dSample "CPI" "`depName'" "`cty'"
* Black et al. CPI and proxy
EstimateBinaryBlack yt xt zt 0 0 dSample "CPI, proxy" "`depName'" "`cty'"
* GMM conditional independence
EstimateBinaryIndep yt xt zt 0 dSample `maxIter' `maxTry' "CPI, proxy" "`depName'" "`cty'"
* IV CPI and proxy
EstimateBinaryIV yt xt zt 0 0 dSample "CPI, proxy" "`depName'" "`cty'"
* GMM fixed misclassification
EstimateBinaryFixed yt xt zt 0 dSample `fixE00' `fixN11' `maxIter' `maxTry' "CPI, proxy" "`depName'" "`cty'"
esttab mod1* mod2* mod3* mod4* mod5*, keep(a b) noomitted ///
title("United States, 1800-1899, IPROD, no controls") ///
stats(N Bound Method Indicator sOverident pOverident nTries Converge maxIter , fmt(0 0 0 0 2 3 0 0 0)) ///
se(2) r2(2) b(2) star(* 0.10 ** 0.05 *** 0.01) ///
refcat(a "Model parameters" biasXa "Bias estimates", nolabel) ///
coeflabels(a "\$\alpha = E[y|\pi>0]$" b "\$\beta = E[y|\pi<0]-E[y|\pi>0]$" ab "\$\alpha+\beta = E[y|\pi<0]$" pd "\$P[\pi<0]$" ///
biasXa "\$plim\ \hat\alpha-\alpha$" biasXb "\$plim\ \hat\beta-\beta$" biasXab "\$plim\ \hat\alpha+\hat\beta-\alpha-\beta$")
esttab mod1* mod2* mod3* mod4* mod5* using $respath/Tab_D3B.txt, replace keep(a b) mlabels(none) collabels(none) nomtitles nolegend nonumbers label noomitted ///
stats(N Bound Method Indicator sOverident pOverident nTries Converge maxIter , fmt(0 0 0 0 2 3 0 0 0)) ///
se(2) r2(2) b(2) star(* 0.10 ** 0.05 *** 0.01) ///
refcat(a "\textbf{Model parameters:}" biasXa "\textbf{Bias estimates:}", nolabel) ///
coeflabels(a "\$\alpha = E[y|\pi>0]$" b "\$\beta = E[y|\pi<0]-E[y|\pi>0]$" ab "\$\alpha+\beta = E[y|\pi<0]$" pd "\$P[\pi<0]$" ///
biasXa "\$plim\ \hat\alpha-\alpha$" biasXb "\$plim\ \hat\beta-\beta$" biasXab "\$plim\ \hat\alpha+\hat\beta-\alpha-\beta$")
replace xt = cpi_dum
replace zt = prx_dum
*-------------------------------------------------------------------------------
* Robustness Table Three indicators
*-------------------------------------------------------------------------------
** Preliminary check whether cells have enough observations
gen dSample2 = (gt<.)
eststo clear
foreach depVar in "iprod" {
* ----------- OLS, CPI--------------
ivreg2 `depVar' xt if dSample2 == 1, robust bw(2)
scalar hasConverged = 1
eststo: nlcom (a: _b[_cons]) (b: _b[xt]) , post
estadd scalar Converge = hasConverged
estadd local Bound "Upper"
estadd local Method "OLS"
estadd local Indicator "CPI"
* ----------- OLS, Proxy--------------
ivreg2 `depVar' zt if dSample2 == 1, robust bw(2)
scalar hasConverged = 1
eststo: nlcom (a: _b[_cons]) (b: _b[zt]) , post
estadd scalar Converge = hasConverged
estadd local Bound "Upper"
estadd local Method "OLS"
estadd local Indicator "Proxy"
* ----------- OLS, Falkner --------------
ivreg2 `depVar' gt if dSample2 == 1, robust bw(2)
scalar hasConverged = 1
eststo: nlcom (a: _b[_cons]) (b: _b[gt]) , post
estadd scalar Converge = hasConverged
estadd local Bound "Upper"
estadd local Method "OLS"
estadd local Indicator "Falkner"
* ------------ Black et al, unconstrained --------------
* Generate deflation indicators
gen m00 = (1-xt)*(1-zt)
gen m10 = xt*(1-zt)
gen m01 = (1-xt)*zt
gen m11 = xt*zt
ivreg2 `depVar' m11 m01 m10 if dSample2 == 1, robust bw(2)
eststo: nlcom (a: _b[_cons]) (b: _b[m11]), post
estadd scalar Converge = 1
estadd local Bound "Upper"
estadd local Method "OLS"
estadd local Assumption "Independence"
estadd local Indicator "CPI, Proxy"
* ------------ Black et al, unconstrained --------------
* Generate deflation indicators
drop m0* m1*
gen m00 = (1-xt)*(1-gt)
gen m10 = xt*(1-gt)
gen m01 = (1-xt)*gt
gen m11 = xt*gt
ivreg2 `depVar' m11 m01 m10 if dSample2 == 1, robust bw(2)
eststo: nlcom (a: _b[_cons]) (b: _b[m11]), post
estadd scalar Converge = 1
estadd local Bound "Upper"
estadd local Method "OLS"
estadd local Assumption "Independence"
estadd local Indicator "CPI, Falkner"
* ------------ Black et al, unconstrained --------------
* Generate deflation indicators
drop m0* m1*
gen m00 = (1-zt)*(1-gt)
gen m10 = zt*(1-gt)
gen m01 = (1-zt)*gt
gen m11 = zt*gt
ivreg2 `depVar' m11 m01 m10 if dSample2 == 1, robust bw(2)
eststo: nlcom (a: _b[_cons]) (b: _b[m11]), post
estadd scalar Converge = 1
estadd local Bound "Upper"
estadd local Method "OLS"
estadd local Assumption "Independence"
estadd local Indicator "Proxy, Falkner"
* ------------ Black et al, unconstrained --------------
* Generate deflation indicators
drop m*
gen m000 = (1-xt)*(1-zt)*(1-gt)
gen m100 = xt*(1-zt)*(1-gt)
gen m010 = (1-xt)*zt*(1-gt)
gen m110 = xt*zt*(1-gt)
gen m001 = (1-xt)*(1-zt)*gt
gen m101 = xt*(1-zt)*gt
gen m011 = (1-xt)*zt*gt
gen m111 = xt*zt*gt
ivreg2 `depVar' m111 m100 m010 m110 m001 m101 m011 if dSample2 == 1, robust bw(2)
eststo: nlcom (a: _b[_cons]) (b: _b[m111]) , post
estadd scalar Converge = 1
estadd local Bound "Upper"
estadd local Method "OLS"
estadd local Assumption "Independence"
estadd local Indicator "All"
disp "`depVar'"
local aInit = _b[a]
local bInit = _b[b]
esttab, noomitted title("Test") ///
stats(r2 N Indicator Bound Meth , fmt(2 0 0 0 0 2 2 2)) ///
se(2) r2(2) b(2) star(* 0.10 ** 0.05 *** 0.01)
esttab using $respath/Tab_D2.txt, replace nolegend nonumbers label noomitted ///
stats(r2 N Indicator Bound Meth ManyTries Converge pDiff pOverident , fmt(2 0 0 0 0 2 2 2)) ///
se(2) b(2) star(* 0.10 ** 0.05 *** 0.01) ///
coeflabels(a "Growth inflation" b "Shortfall deflation")
}
*-------------------------------------------------------------------------------
* Robustness Table GDP per capita, no controls
*-------------------------------------------------------------------------------
* Country and depVar label for saving coefficients
* Note: Set qt = 0 (scalar) for estimation without covariates
local cty = ""
local depName = ""
eststo clear
disp("Main results United States")
foreach depVar in "rgdp" {
replace yt = `depVar'
* OLS CPI
EstimateBinaryOLS yt xt 0 0 dSample "CPI" "`depName'" "`cty'"
* Black et al. CPI and proxy
EstimateBinaryBlack yt xt zt 0 0 dSample "CPI, proxy" "`depName'" "`cty'"
* GMM conditional independence
EstimateBinaryIndep yt xt zt 0 dSample `maxIter' `maxTry' "CPI, proxy" "`depName'" "`cty'"
* IV CPI and proxy
EstimateBinaryIV yt xt zt 0 0 dSample "CPI, proxy" "`depName'" "`cty'"
* GMM fixed misclassification
EstimateBinaryFixed yt xt zt 0 dSample `fixE00' `fixN11' `maxIter' `maxTry' "CPI, proxy" "`depName'" "`cty'"
}
esttab mod1* mod2* mod3* mod4* mod5*, keep(a b ab pd biasX*) noomitted ///
title("United States, 1800-1899, IPROD, no controls") ///
stats(N Bound Method Indicator sOverident pOverident nTries Converge maxIter , fmt(0 0 0 0 2 3 0 0 0)) ///
se(2) r2(2) b(2) star(* 0.10 ** 0.05 *** 0.01) ///
refcat(a "Model parameters" biasXa "Bias estimates", nolabel) ///
coeflabels(a "\$\alpha = E[y|\pi>0]$" b "\$\beta = E[y|\pi<0]-E[y|\pi>0]$" ab "\$\alpha+\beta = E[y|\pi<0]$" pd "\$P[\pi<0]$" ///
biasXa "\$plim\ \hat\alpha-\alpha$" biasXb "\$plim\ \hat\beta-\beta$" biasXab "\$plim\ \hat\alpha+\hat\beta-\alpha-\beta$")
esttab mod1* mod2* mod3* mod4* mod5* using $respath/Tab_C3.txt, replace keep(a b ab pd biasX*) mlabels(none) collabels(none) nomtitles nolegend nonumbers label noomitted ///
stats(N Bound Method Indicator sOverident pOverident nTries Converge maxIter , fmt(0 0 0 0 2 3 0 0 0)) ///
se(2) r2(2) b(2) star(* 0.10 ** 0.05 *** 0.01) ///
refcat(a "\textbf{Model parameters:}" biasXa "\textbf{Bias estimates:}", nolabel) ///
coeflabels(a "\$\alpha = E[y|\pi>0]$" b "\$\beta = E[y|\pi<0]-E[y|\pi>0]$" ab "\$\alpha+\beta = E[y|\pi<0]$" pd "\$P[\pi<0]$" ///
biasXa "\$plim\ \hat\alpha-\alpha$" biasXb "\$plim\ \hat\beta-\beta$" biasXab "\$plim\ \hat\alpha+\hat\beta-\alpha-\beta$")
*-------------------------------------------------------------------------------
* 1870-1899 (Gold Standard) IPROD, no controls
*-------------------------------------------------------------------------------
eststo clear
replace dSample = 0 if date < 1870
eststo clear
disp("1870-1899 United States")
foreach depVar in "iprod" {
replace yt = `depVar'
* OLS CPI
EstimateBinaryOLS yt xt 0 0 dSample "CPI" "`depName'" "`cty'"
* Black et al. CPI and proxy
EstimateBinaryBlack yt xt zt 0 0 dSample "CPI, proxy" "`depName'" "`cty'"
* GMM conditional independence
EstimateBinaryIndep yt xt zt 0 dSample `maxIter' `maxTry' "CPI, proxy" "`depName'" "`cty'"
* IV CPI and proxy
EstimateBinaryIV yt xt zt 0 0 dSample "CPI, proxy" "`depName'" "`cty'"
* GMM fixed misclassification
EstimateBinaryFixed yt xt zt 0 dSample `fixE00' `fixN11' `maxIter' `maxTry' "CPI, proxy" "`depName'" "`cty'"
}
* Set back to original value
replace dSample = 1 if date < 1870 & date >= 1800
esttab mod1* mod2* mod3* mod4* mod5*, keep(a b ab pd biasX*) noomitted ///
title("United States, 1870-1899, GDP, no controls") ///
stats(N Bound Method Indicator sOverident pOverident nTries Converge maxIter , fmt(0 0 0 0 2 3 0 0 0)) ///
se(2) r2(2) b(2) star(* 0.10 ** 0.05 *** 0.01) ///
refcat(a "Model parameters" biasXa "Bias estimates", nolabel) ///
coeflabels(a "\$\alpha = E[y|\pi>0]$" b "\$\beta = E[y|\pi<0]-E[y|\pi>0]$" ab "\$\alpha+\beta = E[y|\pi<0]$" pd "\$P[\pi<0]$" ///
biasXa "\$plim\ \hat\alpha-\alpha$" biasXb "\$plim\ \hat\beta-\beta$" biasXab "\$plim\ \hat\alpha+\hat\beta-\alpha-\beta$")
esttab mod1* mod2* mod3* mod4* mod5* using $respath/Tab_C2.txt, replace keep(a b ab pd biasX*) mlabels(none) collabels(none) nomtitles nolegend nonumbers label noomitted ///
stats(N Bound Method Indicator sOverident pOverident nTries Converge maxIter , fmt(0 0 0 0 2 3 0 0 0)) ///
se(2) r2(2) b(2) star(* 0.10 ** 0.05 *** 0.01) ///
refcat(a "\textbf{Model parameters:}" biasXa "\textbf{Bias estimates:}", nolabel) ///
coeflabels(a "\$\alpha = E[y|\pi>0]$" b "\$\beta = E[y|\pi<0]-E[y|\pi>0]$" ab "\$\alpha+\beta = E[y|\pi<0]$" pd "\$P[\pi<0]$" ///
biasXa "\$plim\ \hat\alpha-\alpha$" biasXb "\$plim\ \hat\beta-\beta$" biasXab "\$plim\ \hat\alpha+\hat\beta-\alpha-\beta$")
*-------------------------------------------------------------------------------
* 1800-1869 (Before Gold Standard) IPROD, no controls
*-------------------------------------------------------------------------------
eststo clear
replace dSample = 0 if date > 1870
eststo clear
disp("1800-1869 United States")
foreach depVar in "iprod" {
replace yt = `depVar'
* OLS CPI
EstimateBinaryOLS yt xt 0 0 dSample "CPI" "`depName'" "`cty'"
* Black et al. CPI and proxy
EstimateBinaryBlack yt xt zt 0 0 dSample "CPI, proxy" "`depName'" "`cty'"
* GMM conditional independence
EstimateBinaryIndep yt xt zt 0 dSample `maxIter' `maxTry' "CPI, proxy" "`depName'" "`cty'"
* IV CPI and proxy
EstimateBinaryIV yt xt zt 0 0 dSample "CPI, proxy" "`depName'" "`cty'"
* GMM fixed misclassification
EstimateBinaryFixed yt xt zt 0 dSample `fixE00' `fixN11' `maxIter' `maxTry' "CPI, proxy" "`depName'" "`cty'"
}
* Set back to original value
replace dSample = 1 if date > 1870 & date <= 1899
esttab mod1* mod2* mod3* mod4* mod5*, keep(a b ab pd biasX*) noomitted ///
title("United States, 1800-1869, GDP, no controls") ///
stats(N Bound Method Indicator sOverident pOverident nTries Converge maxIter , fmt(0 0 0 0 2 3 0 0 0)) ///
se(2) r2(2) b(2) star(* 0.10 ** 0.05 *** 0.01) ///
refcat(a "Model parameters" biasXa "Bias estimates", nolabel) ///
coeflabels(a "\$\alpha = E[y|\pi>0]$" b "\$\beta = E[y|\pi<0]-E[y|\pi>0]$" ab "\$\alpha+\beta = E[y|\pi<0]$" pd "\$P[\pi<0]$" ///
biasXa "\$plim\ \hat\alpha-\alpha$" biasXb "\$plim\ \hat\beta-\beta$" biasXab "\$plim\ \hat\alpha+\hat\beta-\alpha-\beta$")
esttab mod1* mod2* mod3* mod4* mod5* using $respath/Tab_C1.txt, replace keep(a b ab pd biasX*) mlabels(none) collabels(none) nomtitles nolegend nonumbers label noomitted ///
stats(N Bound Method Indicator sOverident pOverident nTries Converge maxIter , fmt(0 0 0 0 2 3 0 0 0)) ///
se(2) r2(2) b(2) star(* 0.10 ** 0.05 *** 0.01) ///
refcat(a "\textbf{Model parameters:}" biasXa "\textbf{Bias estimates:}", nolabel) ///
coeflabels(a "\$\alpha = E[y|\pi>0]$" b "\$\beta = E[y|\pi<0]-E[y|\pi>0]$" ab "\$\alpha+\beta = E[y|\pi<0]$" pd "\$P[\pi<0]$" ///
biasXa "\$plim\ \hat\alpha-\alpha$" biasXb "\$plim\ \hat\beta-\beta$" biasXab "\$plim\ \hat\alpha+\hat\beta-\alpha-\beta$")
*-------------------------------------------------------------------------------
* Main Table IPROD, with lagged dependent
*-------------------------------------------------------------------------------
* Country and depVar label for saving coefficients
* Note: Set qt = 0 (scalar) for estimation without covariates
local cty = ""
eststo clear
disp("Main results United States")
foreach depVar in "iprod" {
replace yt = `depVar'
* OLS CPI
EstimateBinaryOLS yt xt 0 1 dSample "CPI" "`depName'" "`cty'"
* Black et al. CPI and proxy
EstimateBinaryBlack yt xt zt 0 1 dSample "CPI, proxy" "`depName'" "`cty'"
* IV CPI and proxy
EstimateBinaryIV yt xt zt 0 1 dSample "CPI, proxy" "`depName'" "`cty'"
}
esttab mod1* mod2* mod4* , keep(b* l*) noomitted ///
title("United States, 1800-1899, IPROD, no controls") ///
stats(N Bound Method Indicator sOverident pOverident pDiff nTries Converge maxIter , fmt(0 0 0 0 2 3 0 0 0)) ///
se(2) r2(2) b(2) star(* 0.10 ** 0.05 *** 0.01) ///
refcat(a "Model parameters" biasXa "Bias estimates", nolabel) ///
rename(bbank_dum b bshare_dum b bmon_dum b) ///
coeflabels(pOverident "\emph{p}-value \emph{J}-test" b "Shortfall deflation" dbank_dum "Banking crisis" dshare_dum "Stock price decline" dmon_dum "Money growth decline")
esttab mod1* mod2* mod4* using $respath/Tab_D4.txt, replace keep(b* l*) mlabels(none) collabels(none) nomtitles nolegend nonumbers label noomitted ///
stats(N Bound Method Indicator sOverident pOverident pDiff nTries Converge maxIter , fmt(0 0 0 0 2 3 0 0 0)) ///
se(2) r2(2) b(2) star(* 0.10 ** 0.05 *** 0.01) ///
refcat(a "Model parameters" biasXa "Bias estimates", nolabel) ///
rename(bbank_dum b bshare_dum b bmon_dum b) ///
coeflabels(pOverident "\emph{p}-value \emph{J}-test" l "Lagged dep. variable" b "Shortfall deflation" dbank_dum "Banking crisis" dshare_dum "Stock price decline" dmon_dum "Money growth decline")