Skip to content
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

Multiway clustering #1

Open
wagfoliveira opened this issue Jun 1, 2021 · 4 comments
Open

Multiway clustering #1

wagfoliveira opened this issue Jun 1, 2021 · 4 comments

Comments

@wagfoliveira
Copy link

Dear Kirill,

First of all, thank you very much for making your codes public. The paper is very interesting and I am looking forward to implement it in a research I am doing now.

I tried to run did_imputation assigning more than one variable in cluster(id region) but I got "r(103): too many variables specified".

I was wondering if the command should allow for multiway clustering since it is based on reghdfe. Or is there something about the method that is not compatible with multiway clustering?

Thank you in advance and best regards,

Wagner Oliveira
PhD Candidate
FGV EPGE

@borusyak
Copy link
Owner

borusyak commented Jun 1, 2021

Dear Wagner,
We haven't derived inference results for more complicated situations than standard clustering, so it's not supported. And I don't think it'd be obvious to do - check out our section on inference if interested.
But out of curiousity, what's your motivation to use multi-level clustering? What are your id and region variables?

Best,
Kirill

@wagfoliveira
Copy link
Author

Thank you for the answer, Kirill.
In my application, id is a worker and region is a city. I was concerned with errors being correlated for the same worker across time but also in the same city as a proxy for a labor market area.
Alternatively, I would also think about clustering at the firm level since I have a matched employer-employee dataset in this case.

@borusyak
Copy link
Owner

borusyak commented Jun 1, 2021

If workers don't change cities oten, perhaps clustering by city would be enough?
In any case, I'll keep this limitation in mind but I don't think I'll add this feature soon, as it's non-trivial and perhaps a bit non-standard for event studies - sorry!

Kirill

@wagfoliveira
Copy link
Author

Great, no problem Kirill, thank you for your consideration!
I will check on the data to see the implications of clustering at different levels.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants