-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The weighted bacon estimation is not equal to the TWFE when the panel data is unbalanced. #83
Comments
Hi Ziyu, Thanks for the reprex; always helpful for addressing. I'm under the impression that the Bacon decomposition relies on a balanced panel, so I wouldn't say the difference is necessarily an error. That being said, we should probably in the package check for a balanced panel and error otherwise to avoid this confusion |
Thanks a lot for the quick response. Can the conclusion in the original paper apply to the unbalanced case? |
While the general issues are still there, namely |
Thanks for your clarification, really helpful.
Kyle F Butts ***@***.***>于2023年3月13日 周一11:47写道:
… While the general issues are still there, namely $D_{it}$ is residualized
on unit and time dummies and hence you're doing some sort of average of
heterogeneous treatment effects. So in this sense, the conclusions of "Be
careful!!" definitely still holds. However, the algebra that produces the
nice 2x2 comparisons with analytical weights relies on a balanced dataset.
—
Reply to this email directly, view it on GitHub
<#83 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AMEUZH3XUHCMHHUT4R6HHR3W35FQJANCNFSM6AAAAAAVZIGI3I>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Hello,
Thanks for writing such a great package. I am using this package to do some diagnostic analysis. However, I find that when the panel data is unbalanced, the weighted bacon 2*2 estimation is not numerically equal to the TWFE estimation. For example, I use
df1 <- bacondecomp::math_reform
sample.use <- sample(c(1:dim(df1)[1]),500,replace = F)
df2 <- df1[sample.use,]
df2_bacon <- bacon(incearn_ln ~ reform_math,
data = df2,
id_var = "state",
time_var = "class")
sum(df2_bacon$estimate*df2_bacon$weight)
feols(incearn_ln ~ reform_math|state+class,data=df2)
The results given by bacon and twfe are different.
The text was updated successfully, but these errors were encountered: