Hi,
please consider the following data example:
For each firm (Firm_ID), I want to tag the last two years (FY) of a manager's tenure (Manag_ID), as well as the first two years (FY) of the new manager's tenure, with a value of 1. Note that there might be gaps in the FY variable, meaning that for a specific Firm_ID-Manag_ID combination, there could be missing FYs, as seen in observations 5 (FY = 2012) and 6 (FY=2014) of the sample data.
Any help is much appreciated.
please consider the following data example:
Code:
* Example generated by -dataex-. For more info, type help dataex clear input double Firm_ID int FY long Manag_ID float tag 4295899290 2010 18101 1 4295899290 2010 18101 1 4295899290 2010 18101 1 4295899290 2012 35166 1 4295899290 2012 35166 1 4295899290 2014 35166 1 4295899290 2014 35166 1 4295899290 2015 35166 . 4295899290 2015 35166 . 4295899290 2016 35166 . 4295899290 2016 35166 . 4295899290 2016 35166 . 4295899290 2016 35166 . 4295899290 2017 35166 . 4295899290 2017 35166 . 4295899323 2012 12345 1 4295899323 2012 12345 1 4295899323 2012 12345 1 4295899323 2014 88888 1 4295899323 2014 88888 1 4295899323 2015 88888 1 4295899323 2016 . . end
Any help is much appreciated.
Comment