tlamadon / pytwoway

Two way models in python
MIT License
23 stars 6 forks source link

2 or more period-observations #3

Closed beatriceallamand closed 3 years ago

beatriceallamand commented 3 years ago

I think BLM, FE and CRE classes are meant to work on 2-period data, but if one runs them on higher period data they work either way. I wanted to know if that is because the estimation only takes the first two period's observations, or is it using every observation on the data? Thanks!

adamoppenheimer commented 3 years ago

Hi Beatrice, thank you for the question!

A) the FE estimator doesn't make any assumptions about how many periods there are. So it should work with any number of periods in the data.

A) the CRE estimator works with event study format data. So the data takes consecutive observations for the same worker and puts them next to each other, so if a worker has n_w observations you end up with (n_w - 1) number of event studies for that particular worker. The event study can be treated as 2-period data. So this also works with any number of periods in the data.

C) the BLM estimator also works with event study data.