在stata回归中省略了治疗因子变量

时间:2018-04-09 14:34:07

标签: statistics regression stata linear-regression

我正在使用以下代码运行基本的差异差异回归模型,其中包含年份和县固定效果:

xtreg ln_murder_rate i.treated##i.after_1980 i.year ln_deprivation ln_foreign_born young_population manufacturing low_skill_sector unemployment ln_median_income [weight = mean_population], fe cluster(fips) robust

i.treated是一个二分法衡量一个县是否在研究的整个生命周期内接受了治疗,after_1980衡量治疗的后期。但是,当我运行此回归时,我的治疗变量的估计值被省略,所以我无法真正解释结果。下面是输出的屏幕截图。我会喜欢一些关于检查内容的指导,这样我就可以在治疗前得到治疗变量的估计值。

xtreg ln_murder_rate i.treated##i.after_1980 i.year ln_deprivation ln_foreign_bo
> rn young_population manufacturing low_skill_sector unemployment ln_median_income
>  [weight = mean_population], fe cluster(fips) robust
(analytic weights assumed)
note: 1.treated omitted because of collinearity
note: 2000.year omitted because of collinearity

Fixed-effects (within) regression               Number of obs     =     15,221
Group variable: fips                            Number of groups  =      3,117

R-sq:                                           Obs per group:
     within  = 0.2269                                         min =          1
     between = 0.1093                                         avg =        4.9
     overall = 0.0649                                         max =          5

                                                F(12,3116)        =      89.46
corr(u_i, Xb)  = 0.0502                         Prob > F          =     0.0000

                                  (Std. Err. adjusted for 3,117 clusters in fips)
---------------------------------------------------------------------------------
                |               Robust
 ln_murder_rate |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
----------------+----------------------------------------------------------------
      1.treated |          0  (omitted)
   1.after_1980 |   .2012816   .1105839     1.82   0.069    -.0155431    .4181063
                |
        treated#|
     after_1980 |
           1 1  |   .0469658   .0857318     0.55   0.584    -.1211307    .2150622
                |
           year |
          1970  |   .4026329   .0610974     6.59   0.000     .2828376    .5224282
          1980  |   .6235034   .0839568     7.43   0.000     .4588872    .7881196
          1990  |   .4040176   .0525122     7.69   0.000     .3010555    .5069797
          2000  |          0  (omitted)
                |
 ln_deprivation |   .3500093    .119083     2.94   0.003     .1165202    .5834983
ln_foreign_born |   .0179036   .0616842     0.29   0.772    -.1030421    .1388494
young_populat~n |   .0030727   .0081619     0.38   0.707    -.0129306    .0190761
  manufacturing |  -.0242317   .0073166    -3.31   0.001    -.0385776   -.0098858
low_skill_sec~r |  -.0084896   .0088702    -0.96   0.339    -.0258816    .0089025
   unemployment |   .0335105    .027627     1.21   0.225    -.0206585    .0876796
ln_median_inc~e |  -.2423776   .1496396    -1.62   0.105    -.5357799    .0510246
          _cons |   2.751071    1.53976     1.79   0.074    -.2679753    5.770118
----------------+----------------------------------------------------------------
        sigma_u |  .71424066
        sigma_e |  .62213091
            rho |  .56859936   (fraction of variance due to u_i)
---------------------------------------------------------------------------------

1 个答案:

答案 0 :(得分:3)

这是偏离主题的,因为这基本上是一个统计问题。

被处理的变量被丢弃,因为它是时不变的并且您正在进行固定效应回归,它通过减去每个协变量和结果的每个面板的平均值来转换数据。经过处理的观察结果都将处理设置为1,因此当您减去每个面板处理的平均值(也是一个)时,您得到零。类似地,对于对照观察,除了它们都已将处理设置为零。结果是处理后的色谱柱全部为零,Stata将其降低,因为否则基质不可逆,因为没有变化。

您关心的参数被处理#after_1980,这是DID效果并在您的输出中报告。治疗失败的事实并不令人担忧。