天鹰(中南财大——博士研究生)
E-mail: yanbinglh@163.com
三重差分Stata操作(注意:此处仅仅作为三重差分的操作演示)
- 【没有协变量】的三重差分法
diff fte, t(treated) p(t) ddd(bk)
diff fte, t(treated) p(t) ddd(bk) robust
RIPLE DIFFERENCE (DDD) ESTIMATION RESULTS
Notation of DDD:
Control (A) treated = 0 and bk = 1
Control (B) treated = 0 and bk = 0
Treated (A) treated = 1 and bk = 1
Treated (B) treated = 1 and bk = 0
Number of observations in the DDD: 801
Before After
Control (A):34 35 69
Control (B):44 42 86
Treated (A):133 132 265
Treated (B):193 188 381
404 397
--------------------------------------------------------
Outcome var. | fte | S. Err. | |t| | P>|t|
----------------+---------+---------+---------+---------
Before | | | |
Control (A) | 25.654 | | |
Control (B) | 15.540 | | |
Treated (A) | 18.547 | | |
Treated (B) | 16.044 | | |
Diff (T-C) | -7.612 | 2.728 | 2.79 | 0.005***
After | | | |
Control (A) | 22.193 | | |
Control (B) | 13.667 | | |
Treated (A) | 19.913 | | |
Treated (B) | 15.930 | | |
Diff (T-C) | -4.543 | 1.812 | 2.51 | 0.012**
| | | |
DDD | 3.069 | 3.275 | 0.94 | 0.349
--------------------------------------------------------
R-square: 0.09
* Means and Standard Errors are estimated by linear regression
**Robust Std. Errors
**Inference: *** p<0.01; ** p<0.05; * p<0.1
esti stor DDD1
- 【有协变量】的三重差分法
diff fte, t(treated) p(t) ddd(bk) cov(roys wendys)
diff fte, t(treated) p(t) ddd(bk) cov(roys wendys) robust
TRIPLE DIFFERENCE (DDD) ESTIMATION RESULTS
Notation of DDD:
Control (A) treated = 0 and bk = 1
Control (B) treated = 0 and bk = 0
Treated (A) treated = 1 and bk = 1
Treated (B) treated = 1 and bk = 0
Number of observations in the DDD: 801
Before After
Control (A):34 35 69
Control (B):44 42 86
Treated (A):133 132 265
Treated (B):193 188 381
404 397
--------------------------------------------------------
Outcome var. | fte | S. Err. | |t| | P>|t|
----------------+---------+---------+---------+---------
Before | | | |
Control (A) | 25.654 | | |
Control (B) | 9.063 | | |
Treated (A) | 18.547 | | |
Treated (B) | 10.367 | | |
Diff (T-C) | -8.411 | 2.612 | 3.22 | 0.001***
After | | | |
Control (A) | 22.193 | | |
Control (B) | 7.334 | | |
Treated (A) | 19.913 | | |
Treated (B) | 10.331 | | |
Diff (T-C) | -5.276 | 1.759 | 3.00 | 0.003***
| | | |
DDD | 3.135 | 3.145 | 1.00 | 0.319
--------------------------------------------------------
R-square: 0.21
* Means and Standard Errors are estimated by linear regression
**Robust Std. Errors
**Inference: *** p<0.01; ** p<0.05; * p<0.1
esti stor DDDCOV1
diff fte, t(treated) p(t) ddd(bk) cov(roys wendys) ///
robust report
report报告协变量的估计值
对于协变量添加到回归模型中的问题,如果协变量显著,同时有助于提升R^2,则可以考虑添加。
- 用【OLS】估计【有协变量】的【三重差分】估计量
reg fte bk treated c.bk#c.treated t c.t#c.bk c.t#c.treated
c.t#c.bk#c.treated roys wendys, robust
Linear regression Number of obs = 801
F(9, 791) = 40.66
Prob > F = 0.0000
R-squared = 0.2115
Root MSE = 8.0571
------------------------------------------------------------------------------------
| Robust
fte | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------------+----------------------------------------------------------------
bk | 16.59097 2.477767 6.70 0.000 11.72719 21.45475
treated | 1.303991 1.077859 1.21 0.227 -.8118111 3.419793
|
c.bk#c.treated | -8.41141 2.611581 -3.22 0.001 -13.53786 -3.284962
|
t | -1.729012 1.267552 -1.36 0.173 -4.217176 .7591522
|
c.t#c.bk | -1.732542 2.877795 -0.60 0.547 -7.381562 3.916477
|
c.t#c.treated | 1.692315 1.513675 1.12 0.264 -1.278979 4.66361
|
c.t#c.bk#c.treated | 3.135126 3.144552 1.00 0.319 -3.037528 9.307779
|
roys | 8.377883 .756411 11.08 0.000 6.893072 9.862693
wendys | 9.502303 .9042629 10.51 0.000 7.727264 11.27734
_cons | 9.063442 .9598355 9.44 0.000 7.179316 10.94757
------------------------------------------------------------------------------------
esti stor DDDCOVOLS1
esttab DDDCOV1 DDDCOVOLS1 using testldddcovols1.doc, ar2(%8.4f) se(%8.4f) nogap brackets aic bic mtitles replace
-----------------------------------------
(1) (2)
DDDCOV1 DDDCOVOLS1
--------------------------------------------
t -1.729 -1.729
[1.2676] [1.2676]
treated 1.304 1.304
[1.0779] [1.0779]
bk 16.59*** 16.59***
[2.4778] [2.4778]
__000002 -8.411**
[2.6116]
__000003 1.692
[1.5137]
__000004 -1.733
[2.8778]
_diff 3.135
[3.1446]
roys 8.378*** 8.378***
[0.7564] [0.7564]
wendys 9.502*** 9.502***
[0.9043] [0.9043]
c.bk#c.tre~d -8.411**
[2.6116]
c.t#c.bk -1.733
[2.8778]
c.t#c.trea~d 1.692
[1.5137]
c.t#c.bk#c~d 3.135
[3.1446]
_cons 9.063*** 9.063***
[0.9598] [0.9598]
--------------------------------------------
N 801 801
adj. R-sq 0.2026 0.2026
AIC 5625.7 5625.7
BIC 5672.6 5672.6
--------------------------------------------
Standard errors in brackets
* p<0.05, ** p<0.01, *** p<0.001
网友评论