Hi all,
I've got monthly panel data on stock split announcements from the years 1999 to 2017 for 600 companies. All companies have a GICS code (industry code) and based on their six-digit GICS code they have got peers (companies who are in the same industry/have the same GICS-code).
I want to make a dummy variable that takes the value of 1 when any of their peers have done a stock split announcement in the last 12 months and takes the value of 0 when none of their peers have done a stock split announcement. Do you have any idea how to obtain this dummy variable in STATA? Can you show me which kind of code to use?
Example of my data
T ; Company ; GICS ; Announcement
1-1999; 1 ; 0
2-1999; 1 ; 1
...
Help will be greatly appreciated.
I've got monthly panel data on stock split announcements from the years 1999 to 2017 for 600 companies. All companies have a GICS code (industry code) and based on their six-digit GICS code they have got peers (companies who are in the same industry/have the same GICS-code).
I want to make a dummy variable that takes the value of 1 when any of their peers have done a stock split announcement in the last 12 months and takes the value of 0 when none of their peers have done a stock split announcement. Do you have any idea how to obtain this dummy variable in STATA? Can you show me which kind of code to use?
Example of my data
T ; Company ; GICS ; Announcement
1-1999; 1 ; 0
2-1999; 1 ; 1
...
Help will be greatly appreciated.
Comment