Dear Statalisters;
I have the following dataset, including firm_name, manager_name, the time the managers start working in the firm and the time they leave the firm. One firm can be managed by several managers at one time. I would like to identify the period where the manager is the single manager of the firm
For example, for firm A, A Spencer managed the firm from 28 Feb 2003 to 14 May 2006 while S Tarca managed the firm from 28 Feb 2003 to 17 Nov 2008, so the period that Spencer is a single manager is None, while S Tarca is the single manager of Firm A from 14 May 2006 to 17 Nov 2008.
Things will get more complicated when firms have more managers during the study period.
Can you please help me with this?
Thank you very much in advance.
I have the following dataset, including firm_name, manager_name, the time the managers start working in the firm and the time they leave the firm. One firm can be managed by several managers at one time. I would like to identify the period where the manager is the single manager of the firm
For example, for firm A, A Spencer managed the firm from 28 Feb 2003 to 14 May 2006 while S Tarca managed the firm from 28 Feb 2003 to 17 Nov 2008, so the period that Spencer is a single manager is None, while S Tarca is the single manager of Firm A from 14 May 2006 to 17 Nov 2008.
Things will get more complicated when firms have more managers during the study period.
Can you please help me with this?
Thank you very much in advance.
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input str42 firm_name str31 manager_name float(begin end) "A" " A Spencer" 15764 16935 "A" " S Tarca" 15764 17853 "C" " R Weller" 16162 18567 "C" " J Alonzo" 16741 22128 "C" " C Blum" 17556 19084 "C" " D Ruhl" 19084 21854 "C" " G Fish" 19206 21489 "C" " W Choi" 21854 22128 "B" " A Spencer" 15792 16935 "B" " S Tarca" 15792 17853 "B" " R Weller" 16162 18567 "B" " J Alonzo" 16755 22128 "B" " C Blum" 17556 19084 "B" " D Ruhl" 19084 21854 "B" " S Tarca" 15792 17853 end format %td begin format %td end
Comment