I am attempting Attrition Analysis in R using the Survival & KMsurv Package. My question is more related to how to use the R package / functionality for my situation.
Let us say the analysis is for Department B.
I have the following dataset:
- All employees who were associated with Department B for a period (say 1 Jan 2013-31 Dec 2015) (So this has some employees who joined way before 2013 )
- Each employee has a start_date and an end_date
While setting up the Survival object, I have done the following:
spell is : end_date - start_date -> for employess who have left: 31-dec-2015 - start_date -> for employees who had not left by 31-dec-2015
event is: 1 - if employee has quit by 31-Dec-2015 0 - if employee has not quit by 31-Dec-2015
I then build the survival object using: Surv(spell, event).
I have some doubts about this:
- I do not have data on all employees who joined before 1-Jan-2013 (I only have data for employees who remained till after 1-Jan-2013). Will this corrupt the analysis ?
- Should I consider the employees that joined before 1-Jan-2013 as "left truncated". So that means in the definition of spell for them, start_date is not their respective start_date but 1-Jan-2013.