lsun20 / EventStudyInteract

MIT License
34 stars 12 forks source link

does the package not require panel setting? #6

Closed reachyou91 closed 11 months ago

reachyou91 commented 1 year ago

Hello, I have been using the package for event study.

I am using it to a granular level, such as businesses having reviews on a daily level. In this case, one business may have several reviews in a day. I know CSDID requires a panel setting such as 'xtset' command in Stata, and the package did not work until I mandated it as a panel structure.

However, I recognized that when I use EventStudyInteract, it works without the restriction of such panel setting, so here is the question:

Does EventStudyInteract automatically calculate the average (or weighted measure) value, making it a panel structure (e.g., one aggregated value for reviews for a business - day level)? Or does it just consider all reviews as it is without considering such restrictions?

Thank you in advance for answering.

lsun20 commented 1 year ago

Thank you for your interest in the package! Under the hood, the package is calling something along the line of reghdfe outcome rel_time * cohort, absorb(FE) where rel_time is the set of relative time indicators and cohort is the set of indicators for belonging to different treatment groups. The package does not restrict rel_time to be dummy variables per se. So the interpretation relies on how rel_time is defined in your case. Specifically you can construct rel_time based on the aggregated value you mentioned, or based on indicators for having {1,2,3,4,...} reviews if that is what you meant by all reviews. Hope this helps!

reachyou91 commented 11 months ago

Thank you for your clarification!