Dear all,
I was hoping someone would be able to help me figure out the following:
I want to create new variables (change_1, change_2...change_n), that contains the date of when a change in the team happened (someone left/joined).
The variables used to track this are 'AppointmentDate' (joined) and 'ResignationDate' (left).
Whenever a change happens, I want to create a new variable 'change_1', 'change_2'...., and it contains either the appointment or resignation date.
BvdIdNumber = the company number (used as a grouping variable).
UCI = employee number
It could be that some firms only have 1 change vs others having multiple during their lifecycle, therefore that I wanted to not only look at fixed time periods (eg. years) as for some firms this means no change happened, while for others many team changes have occurred.
Additionally, if possible, I would only like to track changes as of 1 year (potentially 1/2 year) after the company's start (DateofIncorporation) not to count the founding team as a change.
Small side note: There are still some duplicates in the data (aka same employee number and same appointment/resignation date), do I need to get rid of these first?
My goal with this is to create a wide dataset that I can then, after removing individual-level variables, turn into a long format to perform a survival analysis (stcox).
Rather than using only years or months to identify team composition, I would also try my hand at looking at changes and calculating gender/age/nationality diversity after each change (perhaps using stsplit).
I would then based on the date in the variable calculate a diversity measure for all people present at that time.
Would anyone know how to start coding this or point me in the right direction?
I have not been able to find what I am looking for, but it could also be me not using the right vocab.
Thanks in advance for your help!
Below is an excerpt of my data using dataex
Best regards,
Laura
I was hoping someone would be able to help me figure out the following:
I want to create new variables (change_1, change_2...change_n), that contains the date of when a change in the team happened (someone left/joined).
The variables used to track this are 'AppointmentDate' (joined) and 'ResignationDate' (left).
Whenever a change happens, I want to create a new variable 'change_1', 'change_2'...., and it contains either the appointment or resignation date.
BvdIdNumber = the company number (used as a grouping variable).
UCI = employee number
It could be that some firms only have 1 change vs others having multiple during their lifecycle, therefore that I wanted to not only look at fixed time periods (eg. years) as for some firms this means no change happened, while for others many team changes have occurred.
Additionally, if possible, I would only like to track changes as of 1 year (potentially 1/2 year) after the company's start (DateofIncorporation) not to count the founding team as a change.
Small side note: There are still some duplicates in the data (aka same employee number and same appointment/resignation date), do I need to get rid of these first?
My goal with this is to create a wide dataset that I can then, after removing individual-level variables, turn into a long format to perform a survival analysis (stcox).
Rather than using only years or months to identify team composition, I would also try my hand at looking at changes and calculating gender/age/nationality diversity after each change (perhaps using stsplit).
I would then based on the date in the variable calculate a diversity measure for all people present at that time.
Would anyone know how to start coding this or point me in the right direction?
I have not been able to find what I am looking for, but it could also be me not using the right vocab.
Thanks in advance for your help!
Below is an excerpt of my data using dataex
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input str16 BvdIdNumber str10 DateOfIncorporation float(FirmFailure2 DateFailure) str10(DMUci DMAppointmentDate DMResignationDate) float DMGenderDummy str10 DMBirthdate str27 Nationality "AT9070350951" "2016" 1 . "P039706490" "04/05/2016" "" 0 "1978" "Austria" "AT9070350951" "2016" 1 . "P039706490" "04/05/2016" "" 0 "1978" "Austria" "AT9070350951" "2016" 1 22410 "P039706490" "04/05/2016" "" 0 "1978" "Austria" "AT9070350951" "2016" 1 22410 "P206368021" "04/05/2016" "" 0 "1961" "Austria" "AT9070350951" "2016" 1 22410 "P039706490" "04/05/2016" "" 0 "1978" "Austria" "AT9070350951" "2016" 1 . "P206368021" "04/05/2016" "" 0 "1961" "Austria" "AT9070422953" "11/12/2017" 1 21844 "P301627755" "18/09/2018" "16/09/2019" 0 "10/03/1995" "Austria" "AT9070422953" "11/12/2017" 1 21844 "P300272480" "24/01/2018" "" 0 "17/04/1993" "Austria" "AT9110939024" "08/01/2016" 1 21825 "P117216063" "04/02/2016" "" 0 "1968" "Germany" "AT9110939024" "08/01/2016" 1 21825 "P001968694" "04/02/2016" "" 0 "30/03/1962" "Germany" "BE0536436625" "28/06/2013" 1 20438 "P009351640" "31/01/2015" "16/12/2015" 0 "1967" "Canada" "BE0536436625" "28/06/2013" 1 20438 "P009351700" "31/01/2015" "16/12/2015" 0 "1960" "United Kingdom" "BE0536436625" "28/06/2013" 1 . "P009351640" "31/01/2015" "16/12/2015" 0 "1967" "Canada" "BE0536436625" "28/06/2013" 1 20438 "P048688796" "31/01/2015" "16/12/2015" 0 "1971" "United Kingdom" "BE0536436625" "28/06/2013" 1 . "P009351700" "31/01/2015" "16/12/2015" 0 "1960" "United Kingdom" "BE0536436625" "28/06/2013" 1 . "P048688796" "31/01/2015" "16/12/2015" 0 "1971" "United Kingdom" "BE0536436625" "28/06/2013" 1 20438 "P014424187" "28/06/2013" "" 0 "1956" "Canada" "BE0536436625" "28/06/2013" 1 . "P014424187" "28/06/2013" "" 0 "1956" "Canada" "BE0555980046" "10/07/2014" 1 21236 "P039659380" "05/08/2015" "21/02/2018" 0 "1965" "United Kingdom" "BE0555980046" "10/07/2014" 1 21236 "P076509994" "10/07/2014" "" 0 "11/11/1970" "France" "BE0656918246" "22/06/2016" 1 21081 "P349820174" "22/06/2016" "23/06/2020" 0 "06/11/1980" "Bulgaria" "BE0656918246" "22/06/2016" 1 21081 "P141888237" "24/11/2016" "" 0 "31/07/1989" "Bulgaria" "BE0656918246" "22/06/2016" 1 21081 "P349820174" "22/06/2016" "23/06/2020" 0 "06/11/1980" "Bulgaria" "BE0656918246" "22/06/2016" 1 21081 "P141888237" "24/11/2016" "" 0 "31/07/1989" "Bulgaria" "BE0657890622" "30/06/2016" 1 21720 "P077578372" "30/06/2016" "20/06/2019" 0 "19/11/1964" "France" "BE0657890622" "30/06/2016" 1 21720 "P350651532" "30/06/2016" "20/06/2019" 1 "10/11/1965" "France" "BE0664736644" "17/10/2016" 1 21181 "P365060689" "17/10/2016" "" 0 "22/01/1981" "Netherlands" "BE0664736644" "17/10/2016" 1 21181 "P438431943" "17/10/2016" "" 1 "11/12/1991" "Romania" "BE0664799594" "18/10/2016" 1 21906 "P006533913" "18/10/2016" "23/12/2019" 0 "16/02/1968" "United Kingdom" "BE0664799594" "18/10/2016" 1 21906 "P263565204" "18/10/2016" "23/12/2019" 0 "24/08/1939" "Greece" "BE0664799594" "18/10/2016" 1 21906 "P006533911" "18/10/2016" "23/12/2019" 0 "29/07/1969" "Greece" "BE0808687713" "23/12/2008" 1 . "P068611593" "02/01/2011" "03/10/2017" 0 "15/01/1968" "Denmark" "BE0808687713" "23/12/2008" 1 19837 "P068611593" "02/01/2011" "03/10/2017" 0 "15/01/1968" "Denmark" end format %td DateFailure
Best regards,
Laura
Comment