-
Notifications
You must be signed in to change notification settings - Fork 95
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
Clustered standard errors #123
Comments
Yes, you are right, I think the issue is with the documentation. Brant |
Hi Brant! Thanks so much for getting back to me quickly! I really appreciate how easy your package makes computing staggered DiDs. So to be absolutely sure that I understand this correctly, when I set clustervars='state', I am clustering on both idname and state? Not state instead of idname? |
Hi Hannah,
Since state “nests” idname, in this case you are effectively clustering at
the state level.
Thanks
On Thu, Apr 7, 2022 at 12:20 Hannah Catabia ***@***.***> wrote:
Hi Brant! Thanks so much for getting back to me quickly! I really
appreciate how easy your package makes computing staggered DiDs. So to be
absolutely sure that I understand this correctly, when I set
*clustervars='state'*, I am clustering on *both* *idname* and *state*?
—
Reply to this email directly, view it on GitHub
<#123 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABE734563ZEFK6RZTYCKVPLVD4YQPANCNFSM5S2CO4FA>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
--
===============================
Pedro H. C. Sant'Anna
Department of Economics
Vanderbilt University
615-875-8448 (phone)
***@***.***
https://pedrohcgs.github.io
===============================
|
Thank you! |
Another quick question. Say that the idname and the other chosen cluster variable are not nested. For instance, say I set clustervars=year. Since they are not nested, how is the cluster-robust variance matrix calculated? Is it this method: That is to stay, adding the variance matrix for idname clusters to the variance matrix for year clusters, then subtracting the variance matrix for idname interacted with year? |
The way we calculate clustered standard errors (both in nested and non-nested cases) are by using the multiplier bootstrap and making the "same" draw of the weights for units in the same clusters. I am not sure if this is roughly analogous to the formula that you sent. @pedrohcgs, any comments? |
Don't think there is necessarily a bug, but I need clarification on an issue with the clustervar argument in att_gt. Docs say that you may enter a vector of up to two variables for clustering, as long as one of them is equivalent to idname. However, when I try to cluster on both state and idname (which is actually a column in my dataset that is also input as idname for the function--sorry for the confusing variable names), I get the following error:
I don't get an error when the only variable I choose is state. Is this because idname is already automatically included in the cluster?
The text was updated successfully, but these errors were encountered: