You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The diff-in-diff event study code in Python generate the interactions in the wrong order INX_0, INX_1, INX_10, INX_11, INX_12, ... instead of INX_0, INX_1, INX_2, ... INX_11, ...
The resulting figure also has evidence of this
I think the best place to reorder these variables in the df is right before running the regression, but I have been getting tripped up with the factors.union line.
The text was updated successfully, but these errors were encountered:
should be res = res.reindex(range(res.index.min(), res.index.max()+1)).fillna(0) when reindex the results.
Btw, the 'time_to_treat' has reverse sign: I suppose that '_nfd' is the treatment year, it shoudl be
df['year'].sub(df['_nfd'])
# missing values for _nfd implies no treatment
.fillna(0)
# so we don't have decimals in our factor names
.astype('int'))```
The diff-in-diff event study code in Python generate the interactions in the wrong order INX_0, INX_1, INX_10, INX_11, INX_12, ... instead of INX_0, INX_1, INX_2, ... INX_11, ...
The resulting figure also has evidence of this
I think the best place to reorder these variables in the df is right before running the regression, but I have been getting tripped up with the factors.union line.
The text was updated successfully, but these errors were encountered: