Hi everyone,
I'm implementing a Dynamic Difference-in-Difference using this specification: https://lost-stats.github.io/Model_E...ent_study.html
In my case I have two treatments and I'm inserting both in the same regression. However, stata is not able to compute the last period coefficient due to collinearity with some other variable. This is what I obtain:
summ shifted_ttt if time_to_treat== -1
local true_neg1 = r(mean)
summ shifted_ttt_hum if time_to_treat_hum== -1
local true_neg1_hum = r(mean)
reghdfe kidnap_percap ib`true_neg1'.shifted_ttt ib`true_neg1_hum'.shifted_ttt_hum year1997_wage , a(municip year) vce(cluster state_code)
(MWFE estimator converged in 2 iterations)
warning: missing F statistic; dropped variables due to collinearity or too few clusters
note: 14.shifted_ttt_hum omitted because of collinearity
HDFE Linear regression Number of obs = 1,245
Absorbing 2 HDFE groups F( 35, 24) = .
Statistics robust to heteroskedasticity Prob > F = .
R-squared = 0.3981
Adj R-squared = 0.3266
Within R-sq. = 0.0298
Number of clusters (state_code) = 25 Root MSE = 0.7902
(Std. err. adjusted for 25 clusters in state_code)
---------------------------------------------------------------------------------
| Robust
kidnap_percap | Coefficient std. err. t P>|t| [95% conf. interval]
----------------+----------------------------------------------------------------
shifted_ttt |
0 | 1.211634 .745825 1.62 0.117 -.3276736 2.750941
1 | .9649967 .6177483 1.56 0.131 -.3099733 2.239967
2 | .8290438 .6090729 1.36 0.186 -.4280209 2.086108
3 | 1.062516 .7497492 1.42 0.169 -.4848903 2.609922
4 | .8269528 .5595077 1.48 0.152 -.3278143 1.98172
5 | .2753037 .3800949 0.72 0.476 -.5091736 1.059781
6 | -.1065119 .1563473 -0.68 0.502 -.4291969 .2161731
8 | -.4686869 .2480413 -1.89 0.071 -.9806189 .0432452
9 | -.3320617 .3076888 -1.08 0.291 -.9671002 .3029768
10 | -.202719 .3843081 -0.53 0.603 -.9958918 .5904539
11 | -.2461737 .401361 -0.61 0.545 -1.074542 .5821946
12 | -.5574501 .4603082 -1.21 0.238 -1.50748 .3925793
13 | -.3514617 .4191014 -0.84 0.410 -1.216444 .5135212
14 | -.7917132 .4394031 -1.80 0.084 -1.698597 .1151703
15 | -.8800944 .4815263 -1.83 0.080 -1.873916 .113727
16 | -.2899827 .4697766 -0.62 0.543 -1.259554 .6795887
17 | -.6544247 .65996 -0.99 0.331 -2.016515 .7076657
18 | -.5753641 .6323373 -0.91 0.372 -1.880444 .729716
19 | -.8326665 .8050052 -1.03 0.311 -2.494116 .8287827
20 | .0772888 .7229269 0.11 0.916 -1.414759 1.569336
21 | -.1267325 .765535 -0.17 0.870 -1.706719 1.453254
|
shifted_ttt_hum |
0 | -1.181811 .893298 -1.32 0.198 -3.025487 .6618657
1 | -.9043034 .7863956 -1.15 0.262 -2.527344 .7187373
2 | -.7478087 .6439097 -1.16 0.257 -2.076773 .5811556
3 | -.2018611 .5801548 -0.35 0.731 -1.399242 .9955196
4 | -.4215726 .568308 -0.74 0.465 -1.594503 .7513575
5 | -.1795917 .421546 -0.43 0.674 -1.04962 .6904365
6 | -.2224045 .3537052 -0.63 0.535 -.9524163 .5076072
7 | -.1356095 .3019991 -0.45 0.657 -.758905 .487686
8 | -.1808626 .2368216 -0.76 0.452 -.6696384 .3079133
10 | .1483371 .1554843 0.95 0.350 -.1725667 .469241
11 | .1155378 .2061198 0.56 0.580 -.3098726 .5409482
12 | .3794533 .1965139 1.93 0.065 -.0261315 .7850381
13 | .1765643 .1700955 1.04 0.310 -.1744955 .527624
14 | 0 (omitted)
|
year1997_wage | -.0463263 .0466372 -0.99 0.330 -.1425808 .0499281
_cons | 1.428866 .7717646 1.85 0.076 -.1639781 3.021709
---------------------------------------------------------------------------------
Can somebody help me? If I remove the municipality fixed effects or the first treatment (i.e. shifted_ttt) period 14 is not collinear with other variables anymore.
Thank you!
I'm implementing a Dynamic Difference-in-Difference using this specification: https://lost-stats.github.io/Model_E...ent_study.html
In my case I have two treatments and I'm inserting both in the same regression. However, stata is not able to compute the last period coefficient due to collinearity with some other variable. This is what I obtain:
summ shifted_ttt if time_to_treat== -1
local true_neg1 = r(mean)
summ shifted_ttt_hum if time_to_treat_hum== -1
local true_neg1_hum = r(mean)
reghdfe kidnap_percap ib`true_neg1'.shifted_ttt ib`true_neg1_hum'.shifted_ttt_hum year1997_wage , a(municip year) vce(cluster state_code)
(MWFE estimator converged in 2 iterations)
warning: missing F statistic; dropped variables due to collinearity or too few clusters
note: 14.shifted_ttt_hum omitted because of collinearity
HDFE Linear regression Number of obs = 1,245
Absorbing 2 HDFE groups F( 35, 24) = .
Statistics robust to heteroskedasticity Prob > F = .
R-squared = 0.3981
Adj R-squared = 0.3266
Within R-sq. = 0.0298
Number of clusters (state_code) = 25 Root MSE = 0.7902
(Std. err. adjusted for 25 clusters in state_code)
---------------------------------------------------------------------------------
| Robust
kidnap_percap | Coefficient std. err. t P>|t| [95% conf. interval]
----------------+----------------------------------------------------------------
shifted_ttt |
0 | 1.211634 .745825 1.62 0.117 -.3276736 2.750941
1 | .9649967 .6177483 1.56 0.131 -.3099733 2.239967
2 | .8290438 .6090729 1.36 0.186 -.4280209 2.086108
3 | 1.062516 .7497492 1.42 0.169 -.4848903 2.609922
4 | .8269528 .5595077 1.48 0.152 -.3278143 1.98172
5 | .2753037 .3800949 0.72 0.476 -.5091736 1.059781
6 | -.1065119 .1563473 -0.68 0.502 -.4291969 .2161731
8 | -.4686869 .2480413 -1.89 0.071 -.9806189 .0432452
9 | -.3320617 .3076888 -1.08 0.291 -.9671002 .3029768
10 | -.202719 .3843081 -0.53 0.603 -.9958918 .5904539
11 | -.2461737 .401361 -0.61 0.545 -1.074542 .5821946
12 | -.5574501 .4603082 -1.21 0.238 -1.50748 .3925793
13 | -.3514617 .4191014 -0.84 0.410 -1.216444 .5135212
14 | -.7917132 .4394031 -1.80 0.084 -1.698597 .1151703
15 | -.8800944 .4815263 -1.83 0.080 -1.873916 .113727
16 | -.2899827 .4697766 -0.62 0.543 -1.259554 .6795887
17 | -.6544247 .65996 -0.99 0.331 -2.016515 .7076657
18 | -.5753641 .6323373 -0.91 0.372 -1.880444 .729716
19 | -.8326665 .8050052 -1.03 0.311 -2.494116 .8287827
20 | .0772888 .7229269 0.11 0.916 -1.414759 1.569336
21 | -.1267325 .765535 -0.17 0.870 -1.706719 1.453254
|
shifted_ttt_hum |
0 | -1.181811 .893298 -1.32 0.198 -3.025487 .6618657
1 | -.9043034 .7863956 -1.15 0.262 -2.527344 .7187373
2 | -.7478087 .6439097 -1.16 0.257 -2.076773 .5811556
3 | -.2018611 .5801548 -0.35 0.731 -1.399242 .9955196
4 | -.4215726 .568308 -0.74 0.465 -1.594503 .7513575
5 | -.1795917 .421546 -0.43 0.674 -1.04962 .6904365
6 | -.2224045 .3537052 -0.63 0.535 -.9524163 .5076072
7 | -.1356095 .3019991 -0.45 0.657 -.758905 .487686
8 | -.1808626 .2368216 -0.76 0.452 -.6696384 .3079133
10 | .1483371 .1554843 0.95 0.350 -.1725667 .469241
11 | .1155378 .2061198 0.56 0.580 -.3098726 .5409482
12 | .3794533 .1965139 1.93 0.065 -.0261315 .7850381
13 | .1765643 .1700955 1.04 0.310 -.1744955 .527624
14 | 0 (omitted)
|
year1997_wage | -.0463263 .0466372 -0.99 0.330 -.1425808 .0499281
_cons | 1.428866 .7717646 1.85 0.076 -.1639781 3.021709
---------------------------------------------------------------------------------
Can somebody help me? If I remove the municipality fixed effects or the first treatment (i.e. shifted_ttt) period 14 is not collinear with other variables anymore.
Thank you!
Comment