TSCS数据的反事实估计|Stata

  • FECT:实现对TSCS数据的反事实估计
    • 固定效应模型(fixed effect)
    • 交互固定效应模型(interactive fixed effects)
    • 矩阵完成模型(matrix completion model)
    • 单元指定样条模型(unit-specific bsplines)
    • 单元指定时间趋势模型(unit-specific time trends)
  • FECT相比于双向固定效应模型的优势
    • 当干预效应存在异质性或存在不可观测时变混淆变量时,提供更可靠的因果估计
  • 可以计算ATT和时期特定ATT(period-specific ATT)
  • 提供安慰剂检验(placebo test)和等效性检验(equivalence test)
  • 干预变量必须是二分变量
  • Liu, L., Wang, Y., & Xu, Y. (2021). A practical guide to counterfactual estimators for causal inference with time-series cross-sectional data. arXiv preprint arXiv:2107.00856.

  • 传统线性双向固定效应模型的局限
    • 在时间序列横截面

 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

cd "/Users/ginglam/OneDrive - whu.edu.cn/02_Data_Storages/Dataset for Learning”
eststo m1:reg Y D X1 X2
esttab m1, nogap se
----------------------------
                      (1)   
                        Y   
----------------------------
D                   11.58***
                  (0.194)   
X1                  0.988***
                 (0.0654)   
X2                  2.976***
                 (0.0644)   
_cons               10.04***
                 (0.0695)   
----------------------------
N                    7000   
----------------------------

fect Y, treat(D) unit(id) time(time) cov(X1 X2) method("fe") force(“none”)
mat list e(ATT)

e(ATT)[1,2]
          ATT          N
r1  11.580523        900
Attachment.pdf
 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

xtset id time
eststo m2: xtreg Y D X1 X2,fe
esttab m2, nogap se
----------------------------
                      (1)   
                        Y   
----------------------------
D                   9.045***
                  (0.175)   
X1                  0.972***
                 (0.0530)   
X2                  3.007***
                 (0.0521)   
_cons               10.37***
                 (0.0565)   
----------------------------
N                    7000   
----------------------------

fect Y, treat(D) unit(id) time(time) cov(X1 X2) method("fe") force("unit”)
mat list e(ATT)

e(ATT)[1,2]
          ATT          N
r1  9.2511047        900
Attachment.pdf
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23

eststo m3: xtreg Y D X1 X2 i.time,fe
esttab m3, nogap se keep(D X1 X2)
----------------------------
                      (1)   
                        Y   
----------------------------
D                   3.099***
                  (0.147)   
X1                  0.959***
                 (0.0360)   
X2                  3.055***
                 (0.0354)   
----------------------------
N                    7000   
----------------------------

fect Y, treat(D) unit(id) time(time) cov(X1 X2) method("fe") force("two-way”)
mat list e(ATT)

e(ATT)[1,2]
          ATT          N
r1  3.4890777        900
Attachment.pdf
  • 等效性检验(equivalence test)
    • 通过等效性检验判断识别假设(identification assumption)是否有效
    • 只适用于 fe, ife, mc, bspline, polynomial and both.
1
2

fect Y,  treat(D) unit(id) time(time) cov(X1 X2) se method("fe") preperiod(-25) offperiod(0) equiTest nboots(100)
Attachment.pdf
  • 安慰剂检验(placebo test)
    • 提供安慰剂检验,减轻对前趋势过拟合的担忧(concern of over-fitting in the pre-trend)
    • 在placeboperiod ()指定干预前的范围作为安慰剂周期
1
2

fect Y,  treat(D) unit(id) time(time) cov(X1 X2) se method("fe") placeboTest nboots(100)
Attachment.pdf