This sounds silly but i am stuck here for a while.
I have a question regarding labelling firms whose one aspect of characteristics consecutively (at least 5 year consecutive) meeting a criteria. Hope you could help!
This is a time series.
For example, whever Firm 1 has 4 consecutive year observations equal to 0, I want to label those firm-year combinations as "m". In the following table, it should be year 3-7, year12-15.
Thanks.
Firm | Year | X |
1 | 1 | 1 |
1 | 2 | 1 |
1 | 3 | 0 |
1 | 4 | 0 |
1 | 5 | 0 |
1 | 6 | 0 |
1 | 7 | 0 |
1 | 8 | 3 |
1 | 10 | 2 |
1 | 11 | 3 |
1 | 12 | 0 |
1 | 13 | 0 |
1 | 14 | 0 |
1 | 15 | 0 |
0 Response to Label firms with certain consecutive criteria
Post a Comment