Employee attrition remains an issue for companies around the world, both big and small. Employees either find other positions, are no longer happy with their current position, are let go as a result of developing industries, or are fired. IBM gathered data on a variety of employee metrics on 1470 employees, from gender, monthly income, age, years in current role, and many others. The data scientists’ ultimate goal in collecting this data was to determine how these factors might influence attrition as well as determine the greatest influence on an employee’s decision to leave the company.
The time variable being used as the failure time in this analysis is
YearsAtCompany, a measurement of how many years the given
subject has been working at their company. The status variable measuring
survival is Attrition, with 2 for “Yes” and 1 for “No”. The
following table provides descriptions of the covariates in this
analysis:
Age: Age of the subjectDistanceFromHome: Distance between office and home in
milesEducation: Education level of the subject, with the
following categories 1-5:
EnvironmentSatisfaction: Satisfaction of working
environment, with the following categories 1-4:
Gender: Gender of the subject, male or female
JobInvolvement: How much involvement the subject’s job
requires
JobSatisfaction: How satisfied the subject is with
their current job
MonthlyIncome: Income per month of the subject in
dollarsNumCompaniesWorked: Number of previous companies the
subject has worked atPerformanceRating: Rating of the subject’s job
performance
RelationshipSatisfaction: Satisfaction of the subjects
current relationship
TrainingTimesLastYear: Number of times the subject went
through training last yearWorkLifeBalance: Rating of how well the subject is
balancing work duties with normal life activities
We will perform a survival analysis of these factors to determine the predictors that have the greatest influence on employee attrition. A specific aspect of the dataset we will analyze is whether gender has a major effect on attrition, and how this effect changes with different income groups. The reason for why this is our object of interest is because men and women possibly have different experiences or problems in the work environment, and there is still a gender pay gap in the present day.
inputData <- read.csv("EmployeeRevisionDataset.csv")
attritionData <- inputData
attr.vec <- c()
attr.vec[inputData$Attrition=="Yes"] = 2
attr.vec[inputData$Attrition=="No"] = 1
gender.vec <- c()
gender.vec[inputData$Gender=="Female"] = 2
gender.vec[inputData$Gender=="Male"] = 1
attritionData$Attrition <- attr.vec
attritionData$Gender <- gender.vec
rm(attr.vec, gender.vec)
#Attrition: 1 for no, 2 for yes
#Gender: 1 for male, 2 for female
colnames(attritionData)[1] <- "Age"
A basic Kaplan Meier Estimate plot is as follows:
plot(Surv(attritionData$YearsAtCompany,attritionData$Attrition),
xlab="Years At Company", ylab="Probability of No Attrition",
xlim = c(0,39),ylim = c(0.3,1), main = "KM Plot for Employee Attrition")
First, a coxph test was ran for each covariate separately, to see the p-value of the likelihood tests to get an idea of which covariates would most likely be significant and important in the model.
coxph(Surv(YearsAtCompany, Attrition)~Age, data=attritionData)
## Call:
## coxph(formula = Surv(YearsAtCompany, Attrition) ~ Age, data = attritionData)
##
## coef exp(coef) se(coef) z p
## Age -0.092210 0.911914 0.009999 -9.222 <2e-16
##
## Likelihood ratio test=103.1 on 1 df, p=< 2.2e-16
## n= 1470, number of events= 237
coxph(Surv(YearsAtCompany, Attrition)~DistanceFromHome, data=attritionData)
## Call:
## coxph(formula = Surv(YearsAtCompany, Attrition) ~ DistanceFromHome,
## data = attritionData)
##
## coef exp(coef) se(coef) z p
## DistanceFromHome 0.018768 1.018945 0.007423 2.528 0.0115
##
## Likelihood ratio test=6.14 on 1 df, p=0.01325
## n= 1470, number of events= 237
coxph(Surv(YearsAtCompany, Attrition)~Education, data=attritionData)
## Call:
## coxph(formula = Surv(YearsAtCompany, Attrition) ~ Education,
## data = attritionData)
##
## coef exp(coef) se(coef) z p
## Education -0.11869 0.88808 0.06245 -1.901 0.0573
##
## Likelihood ratio test=3.57 on 1 df, p=0.05871
## n= 1470, number of events= 237
coxph(Surv(YearsAtCompany, Attrition)~EnvironmentSatisfaction, data=attritionData)
## Call:
## coxph(formula = Surv(YearsAtCompany, Attrition) ~ EnvironmentSatisfaction,
## data = attritionData)
##
## coef exp(coef) se(coef) z p
## EnvironmentSatisfaction -0.22382 0.79946 0.05893 -3.798 0.000146
##
## Likelihood ratio test=14.32 on 1 df, p=0.0001539
## n= 1470, number of events= 237
coxph(Surv(YearsAtCompany, Attrition)~Gender, data=attritionData)
## Call:
## coxph(formula = Surv(YearsAtCompany, Attrition) ~ Gender, data = attritionData)
##
## coef exp(coef) se(coef) z p
## Gender -0.1812 0.8342 0.1355 -1.338 0.181
##
## Likelihood ratio test=1.82 on 1 df, p=0.1776
## n= 1470, number of events= 237
coxph(Surv(YearsAtCompany, Attrition)~JobInvolvement, data=attritionData)
## Call:
## coxph(formula = Surv(YearsAtCompany, Attrition) ~ JobInvolvement,
## data = attritionData)
##
## coef exp(coef) se(coef) z p
## JobInvolvement -0.3903 0.6768 0.0865 -4.512 6.41e-06
##
## Likelihood ratio test=19.57 on 1 df, p=9.687e-06
## n= 1470, number of events= 237
coxph(Surv(YearsAtCompany, Attrition)~JobSatisfaction, data=attritionData)
## Call:
## coxph(formula = Surv(YearsAtCompany, Attrition) ~ JobSatisfaction,
## data = attritionData)
##
## coef exp(coef) se(coef) z p
## JobSatisfaction -0.21953 0.80290 0.05795 -3.788 0.000152
##
## Likelihood ratio test=14.25 on 1 df, p=0.0001597
## n= 1470, number of events= 237
coxph(Surv(YearsAtCompany, Attrition)~MonthlyIncome, data=attritionData)
## Call:
## coxph(formula = Surv(YearsAtCompany, Attrition) ~ MonthlyIncome,
## data = attritionData)
##
## coef exp(coef) se(coef) z p
## MonthlyIncome -2.412e-04 9.998e-01 2.539e-05 -9.498 <2e-16
##
## Likelihood ratio test=143.4 on 1 df, p=< 2.2e-16
## n= 1470, number of events= 237
coxph(Surv(YearsAtCompany, Attrition)~NumCompaniesWorked, data=attritionData)
## Call:
## coxph(formula = Surv(YearsAtCompany, Attrition) ~ NumCompaniesWorked,
## data = attritionData)
##
## coef exp(coef) se(coef) z p
## NumCompaniesWorked 0.07197 1.07462 0.02427 2.965 0.00302
##
## Likelihood ratio test=8.3 on 1 df, p=0.003971
## n= 1470, number of events= 237
coxph(Surv(YearsAtCompany, Attrition)~PerformanceRating, data=attritionData)
## Call:
## coxph(formula = Surv(YearsAtCompany, Attrition) ~ PerformanceRating,
## data = attritionData)
##
## coef exp(coef) se(coef) z p
## PerformanceRating 0.01388 1.01397 0.17913 0.077 0.938
##
## Likelihood ratio test=0.01 on 1 df, p=0.9383
## n= 1470, number of events= 237
coxph(Surv(YearsAtCompany, Attrition)~RelationshipSatisfaction, data=attritionData)
## Call:
## coxph(formula = Surv(YearsAtCompany, Attrition) ~ RelationshipSatisfaction,
## data = attritionData)
##
## coef exp(coef) se(coef) z p
## RelationshipSatisfaction -0.10539 0.89997 0.05877 -1.793 0.0729
##
## Likelihood ratio test=3.19 on 1 df, p=0.074
## n= 1470, number of events= 237
coxph(Surv(YearsAtCompany, Attrition)~TrainingTimesLastYear, data=attritionData)
## Call:
## coxph(formula = Surv(YearsAtCompany, Attrition) ~ TrainingTimesLastYear,
## data = attritionData)
##
## coef exp(coef) se(coef) z p
## TrainingTimesLastYear -0.11695 0.88963 0.05374 -2.176 0.0295
##
## Likelihood ratio test=4.86 on 1 df, p=0.02747
## n= 1470, number of events= 237
coxph(Surv(YearsAtCompany, Attrition)~WorkLifeBalance, data=attritionData)
## Call:
## coxph(formula = Surv(YearsAtCompany, Attrition) ~ WorkLifeBalance,
## data = attritionData)
##
## coef exp(coef) se(coef) z p
## WorkLifeBalance -0.21416 0.80722 0.08988 -2.383 0.0172
##
## Likelihood ratio test=5.53 on 1 df, p=0.01869
## n= 1470, number of events= 237
After running a coxph test for all 13 covariates,
Education, Gender,
PerformanceRating, and
RelationshipSatisfaction were found to be insignificant
with p values of 0.0587, 0.1776, 0.938, and 0.074, respectively.
The dataset in this study has 13 possible covariates to use in a model. A way to choose the best covariates out of these choices was to perform a BIC test using forward selection. The initial BIC was calculated with the first covariate to get a baseline value. Next, each covariate was looped on to test whether it had a lower BIC, and if so, was chosen as the best covariate. Forward selection was used to build the model by selecting the best covariate, adding it to the model, and repeating the loop to find the next best covariate to add. Using this method of BIC and forward selection, the optimal model had 8 covariates.
The following R code is the test for the first covariate in the
model, which was determined to be MonthlyIncome.
covariates <- c("Age","DistanceFromHome","Education","EnvironmentSatisfaction","Gender"
,"JobInvolvement","JobSatisfaction","MonthlyIncome","NumCompaniesWorked",
"PerformanceRating","RelationshipSatisfaction","TrainingTimesLastYear",
"WorkLifeBalance")
count <- 2
lowBIC <- BIC(coxph(Surv(YearsAtCompany,Attrition)~get(covariates[1]),data=attritionData))
bestCovariate <- "Age"
while (count <= length(covariates)){
if(BIC(coxph(Surv(YearsAtCompany,Attrition)~get(covariates[count])
,data=attritionData))<lowBIC)
{
lowBIC <- BIC(coxph(Surv(YearsAtCompany,Attrition)~get(covariates[count])
,data=attritionData))
bestCovariate <- covariates[count]
}
count <- count + 1
}
lowBIC
## [1] 3010.323
bestCovariate
## [1] "MonthlyIncome"
MonthlyIncome was determined to be the best covariate
from the previous model, it is taken out of the list of covariates to
test, and put into the model.
covariates <- c("Age","DistanceFromHome","Education","EnvironmentSatisfaction","Gender"
,"JobInvolvement","JobSatisfaction","NumCompaniesWorked",
"PerformanceRating","RelationshipSatisfaction","TrainingTimesLastYear",
"WorkLifeBalance")
count <- 1
while (count <= length(covariates)){
if(BIC(coxph(Surv(YearsAtCompany,Attrition)~MonthlyIncome+get(covariates[count])
,data=attritionData))<lowBIC)
{
lowBIC <- BIC(coxph(Surv(YearsAtCompany,Attrition)~MonthlyIncome+get(covariates[count])
,data=attritionData))
bestCovariate <- covariates[count]
}
count <- count + 1
}
lowBIC
## [1] 2981.076
bestCovariate
## [1] "Age"
Age was determined to be the best covariate from the
previous model, it is taken out of the list of covariates to test, and
put into the model.
covariates <- c("DistanceFromHome","Education","EnvironmentSatisfaction","Gender"
,"JobInvolvement","JobSatisfaction","NumCompaniesWorked",
"PerformanceRating","RelationshipSatisfaction","TrainingTimesLastYear",
"WorkLifeBalance")
count <- 1
while (count <= length(covariates)){
if(BIC(coxph(Surv(YearsAtCompany,Attrition)~MonthlyIncome+Age+get(covariates[count])
,data=attritionData))<lowBIC)
{
lowBIC <- BIC(coxph(Surv(YearsAtCompany,Attrition)~MonthlyIncome+Age+get(covariates[count])
,data=attritionData))
bestCovariate <- covariates[count]
}
count <- count + 1
}
lowBIC
## [1] 2945.774
bestCovariate
## [1] "NumCompaniesWorked"
NumCompaniesWorked was determined to be the best
covariate from the previous model, it is taken out of the list of
covariates to test, and put into the model.
covariates <- c("DistanceFromHome","Education","EnvironmentSatisfaction","Gender"
,"JobInvolvement","JobSatisfaction",
"PerformanceRating","RelationshipSatisfaction","TrainingTimesLastYear",
"WorkLifeBalance")
count <- 1
while (count <= length(covariates)){
if(BIC(coxph(Surv(YearsAtCompany,Attrition)~MonthlyIncome+Age+NumCompaniesWorked+
get(covariates[count])
,data=attritionData))<lowBIC)
{
lowBIC <- BIC(coxph(Surv(YearsAtCompany,Attrition)~MonthlyIncome+Age+NumCompaniesWorked+
get(covariates[count])
,data=attritionData))
bestCovariate <- covariates[count]
}
count <- count + 1
}
lowBIC
## [1] 2929.116
bestCovariate
## [1] "JobInvolvement"
JobInvolvement was determined to be the best covariate
from the previous model, it is taken out of the list of covariates to
test, and put into the model.
covariates <- c("DistanceFromHome","Education","EnvironmentSatisfaction","Gender"
,"JobSatisfaction",
"PerformanceRating","RelationshipSatisfaction","TrainingTimesLastYear",
"WorkLifeBalance")
count <- 1
while (count <= length(covariates)){
if(BIC(coxph(Surv(YearsAtCompany,Attrition)~MonthlyIncome+Age+NumCompaniesWorked+
JobInvolvement+get(covariates[count])
,data=attritionData))<lowBIC)
{
lowBIC <- BIC(coxph(Surv(YearsAtCompany,Attrition)~MonthlyIncome+Age+NumCompaniesWorked+
JobInvolvement+get(covariates[count])
,data=attritionData))
bestCovariate <- covariates[count]
}
count <- count + 1
}
lowBIC
## [1] 2920.354
bestCovariate
## [1] "EnvironmentSatisfaction"
EnvironmentSatisfaction was determined to be the best
covariate from the previous model, it is taken out of the list of
covariates to test, and put into the model.
covariates <- c("DistanceFromHome","Education","Gender"
,"JobSatisfaction",
"PerformanceRating","RelationshipSatisfaction","TrainingTimesLastYear",
"WorkLifeBalance")
count <- 1
while (count <= length(covariates)){
if(BIC(coxph(Surv(YearsAtCompany,Attrition)~MonthlyIncome+Age+NumCompaniesWorked+
JobInvolvement+EnvironmentSatisfaction+get(covariates[count])
,data=attritionData))<lowBIC)
{
lowBIC <- BIC(coxph(Surv(YearsAtCompany,Attrition)~MonthlyIncome+Age+NumCompaniesWorked+
JobInvolvement+EnvironmentSatisfaction+get(covariates[count])
,data=attritionData))
bestCovariate <- covariates[count]
}
count <- count + 1
}
lowBIC
## [1] 2912.644
bestCovariate
## [1] "JobSatisfaction"
JobSatisfaction was determined to be the best covariate
from the previous model, it is taken out of the list of covariates to
test, and put into the model.
covariates <- c("DistanceFromHome","Education","Gender",
"PerformanceRating","RelationshipSatisfaction","TrainingTimesLastYear",
"WorkLifeBalance")
count <- 1
while (count <= length(covariates)){
if(BIC(coxph(Surv(YearsAtCompany,Attrition)~MonthlyIncome+Age+NumCompaniesWorked+
JobInvolvement+EnvironmentSatisfaction+JobSatisfaction+get(covariates[count])
,data=attritionData))<lowBIC)
{
lowBIC <- BIC(coxph(Surv(YearsAtCompany,Attrition)~MonthlyIncome+Age+NumCompaniesWorked+
JobInvolvement+EnvironmentSatisfaction+JobSatisfaction+
get(covariates[count]),data=attritionData))
bestCovariate <- covariates[count]
}
count <- count + 1
}
lowBIC
## [1] 2910.615
bestCovariate
## [1] "TrainingTimesLastYear"
TrainingTimesLastYear was determined to be the best
covariate from the previous model, it is taken out of the list of
covariates to test, and put into the model.
covariates <- c("DistanceFromHome","Education","Gender",
"PerformanceRating","RelationshipSatisfaction",
"WorkLifeBalance")
count <- 1
while (count <= length(covariates)){
if(BIC(coxph(Surv(YearsAtCompany,Attrition)~MonthlyIncome+Age+NumCompaniesWorked+
JobInvolvement+EnvironmentSatisfaction+JobSatisfaction+
TrainingTimesLastYear+get(covariates[count])
,data=attritionData))<lowBIC)
{
lowBIC <- BIC(coxph(Surv(YearsAtCompany,Attrition)~MonthlyIncome+Age+NumCompaniesWorked+
JobInvolvement+EnvironmentSatisfaction+JobSatisfaction+
TrainingTimesLastYear+get(covariates[count])
,data=attritionData))
bestCovariate <- covariates[count]
}
count <- count + 1
}
lowBIC
## [1] 2909.318
bestCovariate
## [1] "DistanceFromHome"
DistanceFromHome was determined to be the best covariate
from the previous model, it is taken out of the list of covariates to
test, and put into the model.
covariates <- c("Education","Gender",
"PerformanceRating","RelationshipSatisfaction",
"WorkLifeBalance")
count <- 1
while (count <= length(covariates)){
if(BIC(coxph(Surv(YearsAtCompany,Attrition)~MonthlyIncome+Age+NumCompaniesWorked+
JobInvolvement+EnvironmentSatisfaction+JobSatisfaction+
TrainingTimesLastYear+DistanceFromHome+get(covariates[count])
,data=attritionData))<lowBIC)
{
lowBIC <- BIC(coxph(Surv(YearsAtCompany,Attrition)~MonthlyIncome+Age+NumCompaniesWorked+
JobInvolvement+EnvironmentSatisfaction+JobSatisfaction+
TrainingTimesLastYear+DistanceFromHome+get(covariates[count])
,data=attritionData))
bestCovariate <- covariates[count]
}
count <- count + 1
}
lowBIC
## [1] 2909.318
bestCovariate
## [1] "DistanceFromHome"
Once the variable bestCovariate returns the same
covariate as the previous test, the model has reached the lowest BIC
possible. For our model, this happened after 8 covariates were
added.
Our model has a BIC of 2909.318 with the following 8 covariates:
MonthlyIncome, Age,
NumCompaniesWorked, JobInvolvement,
EnvironmentSatisfaction, JobSatisfaction,
TrainingTimesLastYear, and
DistanceFromHome.
Next, a Cox PH test was performed using our model. The following table specifies the estimated hazard ratio and 95% confidence intervals for the covariates:
summary(coxph(Surv(YearsAtCompany,Attrition)~MonthlyIncome + Age + NumCompaniesWorked
+ JobInvolvement + EnvironmentSatisfaction + JobSatisfaction + TrainingTimesLastYear
+DistanceFromHome,data=attritionData))
## Call:
## coxph(formula = Surv(YearsAtCompany, Attrition) ~ MonthlyIncome +
## Age + NumCompaniesWorked + JobInvolvement + EnvironmentSatisfaction +
## JobSatisfaction + TrainingTimesLastYear + DistanceFromHome,
## data = attritionData)
##
## n= 1470, number of events= 237
##
## coef exp(coef) se(coef) z Pr(>|z|)
## MonthlyIncome -2.159e-04 9.998e-01 2.703e-05 -7.989 1.36e-15 ***
## Age -7.126e-02 9.312e-01 1.085e-02 -6.568 5.09e-11 ***
## NumCompaniesWorked 1.618e-01 1.176e+00 2.454e-02 6.594 4.27e-11 ***
## JobInvolvement -4.198e-01 6.572e-01 8.484e-02 -4.948 7.50e-07 ***
## EnvironmentSatisfaction -2.327e-01 7.924e-01 5.851e-02 -3.977 6.98e-05 ***
## JobSatisfaction -2.239e-01 7.994e-01 5.850e-02 -3.827 0.00013 ***
## TrainingTimesLastYear -1.439e-01 8.659e-01 5.558e-02 -2.590 0.00960 **
## DistanceFromHome 1.978e-02 1.020e+00 7.445e-03 2.658 0.00787 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## exp(coef) exp(-coef) lower .95 upper .95
## MonthlyIncome 0.9998 1.0002 0.9997 0.9998
## Age 0.9312 1.0739 0.9116 0.9512
## NumCompaniesWorked 1.1756 0.8506 1.1204 1.2336
## JobInvolvement 0.6572 1.5216 0.5565 0.7761
## EnvironmentSatisfaction 0.7924 1.2620 0.7066 0.8887
## JobSatisfaction 0.7994 1.2509 0.7128 0.8965
## TrainingTimesLastYear 0.8659 1.1548 0.7766 0.9656
## DistanceFromHome 1.0200 0.9804 1.0052 1.0350
##
## Concordance= 0.808 (se = 0.015 )
## Likelihood ratio test= 282.7 on 8 df, p=<2e-16
## Wald test = 223.4 on 8 df, p=<2e-16
## Score (logrank) test = 231.5 on 8 df, p=<2e-16
Proportional Hazards Ratio Test: After doing a cox.zph
test for the model, the covariates MonthlyIncome,
Age, and NumCompaniesWorked violate the
proportional hazards assumption, due to their p-values being less than
0.05.
cox.zph(coxph(Surv(YearsAtCompany,Attrition)~MonthlyIncome + Age + NumCompaniesWorked
+ JobInvolvement + EnvironmentSatisfaction + JobSatisfaction + TrainingTimesLastYear
+DistanceFromHome,data=attritionData))
## chisq df p
## MonthlyIncome 14.709 1 0.00013
## Age 5.138 1 0.02341
## NumCompaniesWorked 4.270 1 0.03879
## JobInvolvement 0.147 1 0.70110
## EnvironmentSatisfaction 0.109 1 0.74179
## JobSatisfaction 0.937 1 0.33308
## TrainingTimesLastYear 1.154 1 0.28271
## DistanceFromHome 0.426 1 0.51380
## GLOBAL 20.910 8 0.00739
To confirm the cox.zph, we look at log log plots of the
problematic covariates MonthlyIncome, Age, and
NumCompaniesWorked.
For the income plot, we stratify on the mean value of 6500, to create 2 income groups, those who make an above average income, and those who make a below average income. The mean value was chosen as the stratifying value because 6500*12=$78,000 is a large annual salary.
cloglog <- function(x){log(-log(x))}
summary(attritionData$MonthlyIncome)
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## 1009 2911 4919 6503 8379 19999
attritionData <- mutate(attritionData, big.income=factor(1*(MonthlyIncome>=6500)))
ggsurvplot(survfit(Surv(YearsAtCompany, Attrition)~big.income, data=attritionData), fun=cloglog,
legend.title = "Time at Company",
legend.labs=c("< 6500/month",">= 6500/month"),
title = "Log Log Plot of MonthlyIncome") +
labs(x="Time in years", y="Survival Probability")
The log-log plot for
MonthlyIncome is not parallel,
implying that MonthlyIncome violates the proportional hazards
assumption.
For the age log-log plot, age is stratified on the value
of 43 years, as this is the 75th percentile value.
summary(attritionData$Age)
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## 18.00 30.00 36.00 36.92 43.00 60.00
attritionData <- mutate(attritionData, age.divide=factor(1*(Age>=43)))
ggsurvplot(survfit(Surv(YearsAtCompany, Attrition)~age.divide, data=attritionData), fun=cloglog,
legend.title = "Age",
legend.labs=c("< 43 Years",">= 43 Years"),
title = "Log Log Plot of Age") +
labs(x="Time in years", y="Survival Probability")
The log-log plot for age does not appear to be parallel, implying that
the age covariate violates the proportional hazards assumption.
For the number of companies worked log-log plot, it is stratified on 4, as this is the 75th percentile.
summary(attritionData$NumCompaniesWorked)
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## 0.000 1.000 2.000 2.693 4.000 9.000
attritionData <- mutate(attritionData, lots.companies=factor(1*(NumCompaniesWorked>=4)))
ggsurvplot(survfit(Surv(YearsAtCompany, Attrition)~lots.companies, data=attritionData),
fun=cloglog,
legend.title = "Companies",
legend.labs=c("< 4 Companies",">= 4 Companies"),
title = "Log Log Plot of Number of Companies") +
labs(x="Time in years", y="Survival Probability")
The log-log plot for number of companies is close to parallel, giving a
p value of .04 in the
cox.zph test, but is still in
violation of the the proportional hazards assumption.
To fix the violation of the proportional hazards assumption,
MonthlyIncome was stratified on by separating the variable
into 2 groups. MonthlyIncome was stratified on the mean
value of 6500 dollars, dividing the group into those who have a below
and above average income. After this stratification, the rest of the
covariates in the model were no longer in violation of the proportional
hazards assumption, as their p-values in the cox.zph test were not
significant.
summary(attritionData$MonthlyIncome)
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## 1009 2911 4919 6503 8379 19999
attritionData <- mutate(attritionData, big.income=factor(1*(MonthlyIncome>=6500)))
cox.zph(coxph(Surv(YearsAtCompany,Attrition)~strata(big.income)+
Age+ NumCompaniesWorked + JobInvolvement +
EnvironmentSatisfaction + JobSatisfaction + TrainingTimesLastYear
+DistanceFromHome, data=attritionData))
## chisq df p
## Age 2.82096 1 0.093
## NumCompaniesWorked 3.14717 1 0.076
## JobInvolvement 0.00119 1 0.973
## EnvironmentSatisfaction 0.04547 1 0.831
## JobSatisfaction 0.58191 1 0.446
## TrainingTimesLastYear 0.80438 1 0.370
## DistanceFromHome 0.05093 1 0.821
## GLOBAL 6.25410 7 0.510
This can be confirmed by the following log-log plots of the other covariates:
JobInvolvement was stratified on the value of 3,
corresponding to “high involvement”, to separate the group into 2
levels, those with higher involvement, and those with lower
involvement
summary(attritionData$JobInvolvement)
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## 1.00 2.00 3.00 2.73 3.00 4.00
attritionData <- mutate(attritionData, high.involvement=factor(1*(JobInvolvement>=3)))
ggsurvplot(survfit(Surv(YearsAtCompany, Attrition)~high.involvement, data=attritionData),
fun=cloglog,
legend.title = "Involvement",
legend.labs=c("< High Involvement",">= High Involvement"),
title = "Log Log Plot of Job Involvement") +
labs(x="Time in years", y="Survival Probability")
The log-log plot appears approximately parallel, and job involvement is
not in violation of the proportional hazards assumption.
EnvironmentSatisfaction was stratified on the value of
3, corresponding to “high satisfaction”, to separate the group into 2
levels, those with higher satisfaction, and those with lower
satisfaction.
summary(attritionData$EnvironmentSatisfaction)
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## 1.000 2.000 3.000 2.722 4.000 4.000
attritionData <- mutate(attritionData, high.satisfaction=factor(1*(EnvironmentSatisfaction>=3)))
ggsurvplot(survfit(Surv(YearsAtCompany, Attrition)~high.satisfaction, data=attritionData),
fun=cloglog,
legend.title = "Satisfaction",
legend.labs=c("< High Satisfaction",">= High Satisfaction"),
title = "Log Log Plot of Environment Satisfaction") +
labs(x="Time in years", y="Survival Probability")
The log-log plot appears approximately parallel, and environment
satisfaction is not in violation of the proportional hazards
assumption.
JobSatisfaction was stratified on the value of 3,
corresponding to “high satisfaction”, to separate the group into 2
levels, those with higher satisfaction, and those with lower
satisfaction.
summary(attritionData$JobSatisfaction)
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## 1.000 2.000 3.000 2.729 4.000 4.000
attritionData <- mutate(attritionData, high.job.satisfaction=factor(1*(JobSatisfaction>=3)))
ggsurvplot(survfit(Surv(YearsAtCompany, Attrition)~high.job.satisfaction, data=attritionData),
fun=cloglog,
legend.title = "Satisfaction",
legend.labs=c("< High Satisfaction",">= High Satisfaction"),
title = "Log Log Plot of Job Satisfaction") +
labs(x="Time in years", y="Survival Probability")
The log-log plot appears approximately parallel for the majority of the
data, and job satisfaction is not in violation of the proportional
hazards assumption.
TrainingTimesLastYear was stratified on the value of 3,
which is the 75th percentile.
summary(attritionData$TrainingTimesLastYear)
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## 0.000 2.000 3.000 2.799 3.000 6.000
attritionData <- mutate(attritionData, high.training=factor(1*(TrainingTimesLastYear>=3)))
ggsurvplot(survfit(Surv(YearsAtCompany, Attrition)~high.training, data=attritionData),
fun=cloglog,
legend.title = "Training",
legend.labs=c("< 3 Times",">= 3 Times"),
title = "Log Log Plot of Training Times Last Year") +
labs(x="Time in years", y="Survival Probability")
The log-log plot appears approximately parallel, and training times last
year is not in violation of the proportional hazards assumption.
The following table is the Cox PH results after stratification:
summary(coxph(Surv(YearsAtCompany,Attrition)~strata(big.income)+
Age+ NumCompaniesWorked + JobInvolvement +
EnvironmentSatisfaction + JobSatisfaction + TrainingTimesLastYear
+DistanceFromHome, data=attritionData))
## Call:
## coxph(formula = Surv(YearsAtCompany, Attrition) ~ strata(big.income) +
## Age + NumCompaniesWorked + JobInvolvement + EnvironmentSatisfaction +
## JobSatisfaction + TrainingTimesLastYear + DistanceFromHome,
## data = attritionData)
##
## n= 1470, number of events= 237
##
## coef exp(coef) se(coef) z Pr(>|z|)
## Age -0.089531 0.914360 0.010940 -8.184 2.75e-16 ***
## NumCompaniesWorked 0.149954 1.161780 0.024248 6.184 6.24e-10 ***
## JobInvolvement -0.399636 0.670564 0.084142 -4.750 2.04e-06 ***
## EnvironmentSatisfaction -0.235158 0.790446 0.058641 -4.010 6.07e-05 ***
## JobSatisfaction -0.240389 0.786322 0.058567 -4.104 4.05e-05 ***
## TrainingTimesLastYear -0.139450 0.869836 0.055012 -2.535 0.01125 *
## DistanceFromHome 0.019860 1.020059 0.007367 2.696 0.00702 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## exp(coef) exp(-coef) lower .95 upper .95
## Age 0.9144 1.0937 0.8950 0.9342
## NumCompaniesWorked 1.1618 0.8607 1.1079 1.2183
## JobInvolvement 0.6706 1.4913 0.5686 0.7908
## EnvironmentSatisfaction 0.7904 1.2651 0.7046 0.8867
## JobSatisfaction 0.7863 1.2717 0.7010 0.8820
## TrainingTimesLastYear 0.8698 1.1496 0.7809 0.9689
## DistanceFromHome 1.0201 0.9803 1.0054 1.0349
##
## Concordance= 0.738 (se = 0.019 )
## Likelihood ratio test= 159 on 7 df, p=<2e-16
## Wald test = 152.6 on 7 df, p=<2e-16
## Score (logrank) test = 153.9 on 7 df, p=<2e-16
The hazard ratios that are below 1 indicate a decrease in the hazard
rate with an increase in the given covariate. The hazard ratios above
one indicate an increase in the hazard rate. For example, the estimated
hazard ratio for JobInvolvement is 0.6706. An increase of 1
on the scale of JobInvolvement corresponds to a ~33%
decrease in the hazard ratio. The findings from this output seem to make
intuitive sense for the most part; the more companies an individual has
worked and the further they are from home makes them more likely to
leave the company, whereas the more involved or satisfied they are in
their job or environment, the less likely they are to leave. It is
interesting to note that increased age does not indicate an increase in
hazard rate. On one hand, as people age, people will get closer and
closer to retirement; on the other hand, the longer they have been
working, they may be getting higher pay due to seniority and higher
positions, incentivizing them to stay.
In addition, the initial question in the introduction of this report
was whether gender has a major effect on attrition, and how this effect
changes with different income groups. By doing a Cox PH test with gender
as a covariate, the likelihood ratio test returns a p value of 0.1776,
which indicates that gender does not have a significant effect on
attrition. The next test stratified on MonthlyIncome,
dividing the subjects into 2 groups based on a monthly income of 6500 or
greater. In the stratified Cox PH test, the likelihood ratio test
returned a p value of 0.2676, indicating that gender still has no
significant effect on attrition in different income groups. Furthermore,
if we try to account and control for all of these other significant
covariates in the model, we still reach the same conclusion that Gender
is not a significant covariate, with a p-value of 0.2969.
coxph(Surv(YearsAtCompany,Attrition)~Gender,data=attritionData)
## Call:
## coxph(formula = Surv(YearsAtCompany, Attrition) ~ Gender, data = attritionData)
##
## coef exp(coef) se(coef) z p
## Gender -0.1812 0.8342 0.1355 -1.338 0.181
##
## Likelihood ratio test=1.82 on 1 df, p=0.1776
## n= 1470, number of events= 237
coxph(Surv(YearsAtCompany,Attrition)~strata(big.income) + Gender,data=attritionData)
## Call:
## coxph(formula = Surv(YearsAtCompany, Attrition) ~ strata(big.income) +
## Gender, data = attritionData)
##
## coef exp(coef) se(coef) z p
## Gender -0.1493 0.8613 0.1355 -1.102 0.271
##
## Likelihood ratio test=1.23 on 1 df, p=0.2676
## n= 1470, number of events= 237
coxph(Surv(YearsAtCompany,Attrition)~strata(big.income)+
Age+ NumCompaniesWorked + JobInvolvement +
EnvironmentSatisfaction + JobSatisfaction + TrainingTimesLastYear
+DistanceFromHome + Gender, data=attritionData)
## Call:
## coxph(formula = Surv(YearsAtCompany, Attrition) ~ strata(big.income) +
## Age + NumCompaniesWorked + JobInvolvement + EnvironmentSatisfaction +
## JobSatisfaction + TrainingTimesLastYear + DistanceFromHome +
## Gender, data = attritionData)
##
## coef exp(coef) se(coef) z p
## Age -0.08910 0.91475 0.01094 -8.142 3.87e-16
## NumCompaniesWorked 0.15145 1.16352 0.02428 6.239 4.41e-10
## JobInvolvement -0.39838 0.67140 0.08401 -4.742 2.12e-06
## EnvironmentSatisfaction -0.23623 0.78960 0.05863 -4.029 5.60e-05
## JobSatisfaction -0.23792 0.78827 0.05840 -4.074 4.63e-05
## TrainingTimesLastYear -0.13592 0.87291 0.05505 -2.469 0.0135
## DistanceFromHome 0.02006 1.02026 0.00737 2.722 0.0065
## Gender -0.14243 0.86725 0.13654 -1.043 0.2969
##
## Likelihood ratio test=160.1 on 8 df, p=< 2.2e-16
## n= 1470, number of events= 237
There are many covariates in the dataset that are measurements which
depend on time after the start of the study to predict the time
variable, YearsAtCompany. To account for this, we create
“intermediate” events or “treatments” in a Counting Process model on the
variables YearsInCurrentRole,
YearsSinceLastPromotion,
andYearsWithCurrManager. This was done by splitting by time
and creating intervals of one year. We then tracked when an employee
started working in their current role, promotion, or with their current
manager, logging a 1 in all years where they were and 0s when they were
not. The result is three new columns: SameRole,
LastPromoted, and SameManager, to demonstrate
when each employee started working in their current role, their current
promotion, and with their current manager, respectively.
# Determine times that people started with their current role, promotion, or manager
attritionData$Years <- attritionData$YearsAtCompany
attritionData$Years[attritionData$YearsAtCompany==0] <- 0.25
startYearForRole <- attritionData$YearsAtCompany - attritionData$YearsInCurrentRole
startYearForPromotion <- attritionData$YearsAtCompany - attritionData$YearsSinceLastPromotion
startYearWithManager <- attritionData$YearsAtCompany - attritionData$YearsWithCurrManager
# Surv split
attritionData.split <- survSplit(Surv(Years,Attrition)~ MonthlyIncome + Age
+ NumCompaniesWorked + JobInvolvement +
EnvironmentSatisfaction + JobSatisfaction +
TrainingTimesLastYear + DistanceFromHome + Gender,
cut= c(1:max(attritionData$YearsAtCompany)),
id = "empID", episode="epi", data = attritionData)
# For loop to create two "treatments": 0 if they were not with their current role,
# promotion, or manager, and 1 for when they were
for (i in 1:nrow(attritionData.split)){
attritionData.split$SameRole[i] <-
(attritionData.split$tstart[i] >= startYearForRole[attritionData.split$empID[i]])
attritionData.split$LastPromoted[i] <-
(attritionData.split$tstart[i] >= startYearForPromotion[attritionData.split$empID[i]])
attritionData.split$SameManager[i] <-
(attritionData.split$tstart[i] >= startYearWithManager[attritionData.split$empID[i]])
}
# Convert booleans to 0 and 1
attritionData.split$SameRole <-
as.integer(as.logical(attritionData.split$SameRole))
attritionData.split$LastPromoted <-
as.integer(as.logical(attritionData.split$LastPromoted))
attritionData.split$SameManager <-
as.integer(as.logical(attritionData.split$SameManager))
head(attritionData.split, 10)
# Counting Process Model
summary(coxph(Surv(tstart, Years, Attrition) ~ SameRole + LastPromoted +
SameManager + MonthlyIncome + Age + NumCompaniesWorked +
JobInvolvement + EnvironmentSatisfaction + JobSatisfaction +
TrainingTimesLastYear + DistanceFromHome + Gender,
data = attritionData.split))
## Call:
## coxph(formula = Surv(tstart, Years, Attrition) ~ SameRole + LastPromoted +
## SameManager + MonthlyIncome + Age + NumCompaniesWorked +
## JobInvolvement + EnvironmentSatisfaction + JobSatisfaction +
## TrainingTimesLastYear + DistanceFromHome + Gender, data = attritionData.split)
##
## n= 10346, number of events= 237
##
## coef exp(coef) se(coef) z Pr(>|z|)
## SameRole 4.156e-01 1.515e+00 2.000e-01 2.077 0.03776 *
## LastPromoted 1.316e+00 3.727e+00 1.561e-01 8.427 < 2e-16 ***
## SameManager 7.121e-02 1.074e+00 1.875e-01 0.380 0.70409
## MonthlyIncome -1.973e-04 9.998e-01 2.725e-05 -7.241 4.47e-13 ***
## Age -5.828e-02 9.434e-01 1.031e-02 -5.653 1.58e-08 ***
## NumCompaniesWorked 1.356e-01 1.145e+00 2.514e-02 5.394 6.89e-08 ***
## JobInvolvement -4.121e-01 6.622e-01 8.548e-02 -4.821 1.43e-06 ***
## EnvironmentSatisfaction -2.354e-01 7.903e-01 5.876e-02 -4.006 6.18e-05 ***
## JobSatisfaction -2.420e-01 7.851e-01 5.847e-02 -4.139 3.49e-05 ***
## TrainingTimesLastYear -1.404e-01 8.690e-01 5.319e-02 -2.640 0.00829 **
## DistanceFromHome 1.816e-02 1.018e+00 7.420e-03 2.447 0.01441 *
## Gender -1.435e-01 8.663e-01 1.362e-01 -1.054 0.29197
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## exp(coef) exp(-coef) lower .95 upper .95
## SameRole 1.5152 0.6600 1.0238 2.2426
## LastPromoted 3.7273 0.2683 2.7447 5.0617
## SameManager 1.0738 0.9313 0.7436 1.5507
## MonthlyIncome 0.9998 1.0002 0.9997 0.9999
## Age 0.9434 1.0600 0.9245 0.9626
## NumCompaniesWorked 1.1452 0.8732 1.0902 1.2031
## JobInvolvement 0.6622 1.5100 0.5601 0.7830
## EnvironmentSatisfaction 0.7903 1.2654 0.7043 0.8867
## JobSatisfaction 0.7851 1.2738 0.7000 0.8804
## TrainingTimesLastYear 0.8690 1.1508 0.7830 0.9645
## DistanceFromHome 1.0183 0.9820 1.0036 1.0332
## Gender 0.8663 1.1544 0.6633 1.1314
##
## Concordance= 0.844 (se = 0.013 )
## Likelihood ratio test= 397.3 on 12 df, p=<2e-16
## Wald test = 345.9 on 12 df, p=<2e-16
## Score (logrank) test = 375.6 on 12 df, p=<2e-16
Running the simplified version of this Counting Process Model, the
output has interesting revelations about the data. We observe that
SameRole and LastPromoted are significant but
SameManager isn’t. Inspecting the hazard rates, we observe
how high the impact is of not being promoted with the hazard rate,
nearly 4x. We also observe that the longer time spent in the same role
or with the same manager also increases the hazard rate. These mostly
make intuitive sense; the longer you spend in a current role or the
longer it’s been since your last promotion or the longer time spent with
a current manager, the more unsatisfied you likely will be (and thus the
higher your chances of quitting or leaving in some fashion). Overall, we
do not observe a stark difference in the hazard rates of the other
covariates in this more advanced model. The Counting Process Model still
suggests that gender is not statistically significant.
summary(coxph(Surv(tstart, Years, Attrition) ~ strata(epi) + SameRole + LastPromoted +
SameManager + strata(epi):LastPromoted +
strata(epi):SameRole + strata(epi):SameManager +
strata(epi):Gender + Gender + MonthlyIncome + Age + NumCompaniesWorked +
JobInvolvement + EnvironmentSatisfaction + JobSatisfaction +
TrainingTimesLastYear + DistanceFromHome,
data = attritionData.split))
## Warning in agreg.fit(X, Y, istrat, offset, init, control, weights = weights, :
## Ran out of iterations and did not converge
## Call:
## coxph(formula = Surv(tstart, Years, Attrition) ~ strata(epi) +
## SameRole + LastPromoted + SameManager + strata(epi):LastPromoted +
## strata(epi):SameRole + strata(epi):SameManager + strata(epi):Gender +
## Gender + MonthlyIncome + Age + NumCompaniesWorked + JobInvolvement +
## EnvironmentSatisfaction + JobSatisfaction + TrainingTimesLastYear +
## DistanceFromHome, data = attritionData.split)
##
## n= 10346, number of events= 237
##
## coef exp(coef) se(coef) z Pr(>|z|)
## SameRole -6.860e-01 5.036e-01 4.236e-01 -1.619 0.10536
## LastPromoted 1.499e+00 4.478e+00 3.706e-01 4.045 5.24e-05
## SameManager 7.336e-02 1.076e+00 3.968e-01 0.185 0.85333
## Gender -2.025e-01 8.167e-01 2.455e-01 -0.825 0.40938
## MonthlyIncome -1.972e-04 9.998e-01 2.846e-05 -6.930 4.22e-12
## Age -5.462e-02 9.468e-01 1.022e-02 -5.345 9.04e-08
## NumCompaniesWorked 1.401e-01 1.150e+00 2.538e-02 5.518 3.43e-08
## JobInvolvement -4.383e-01 6.452e-01 8.620e-02 -5.084 3.69e-07
## EnvironmentSatisfaction -2.322e-01 7.928e-01 5.958e-02 -3.897 9.76e-05
## JobSatisfaction -2.592e-01 7.716e-01 5.867e-02 -4.419 9.93e-06
## TrainingTimesLastYear -1.381e-01 8.710e-01 5.367e-02 -2.574 0.01006
## DistanceFromHome 1.947e-02 1.020e+00 7.471e-03 2.607 0.00914
## strata(epi)epi=2:LastPromoted 1.546e+00 4.692e+00 7.392e-01 2.091 0.03649
## strata(epi)epi=3:LastPromoted 3.915e-02 1.040e+00 5.886e-01 0.067 0.94697
## strata(epi)epi=4:LastPromoted -4.265e-01 6.528e-01 5.913e-01 -0.721 0.47073
## strata(epi)epi=5:LastPromoted -4.748e-01 6.220e-01 5.780e-01 -0.821 0.41143
## strata(epi)epi=6:LastPromoted -1.743e+00 1.750e-01 8.027e-01 -2.172 0.02988
## strata(epi)epi=7:LastPromoted 3.409e-01 1.406e+00 8.697e-01 0.392 0.69506
## strata(epi)epi=8:LastPromoted 6.033e-01 1.828e+00 1.125e+00 0.536 0.59193
## strata(epi)epi=9:LastPromoted -4.544e-01 6.348e-01 8.989e-01 -0.506 0.61320
## strata(epi)epi=10:LastPromoted -1.204e-01 8.866e-01 7.340e-01 -0.164 0.86973
## strata(epi)epi=11:LastPromoted 1.421e+01 1.476e+06 2.820e+03 0.005 0.99598
## strata(epi)epi=12:LastPromoted NA NA 0.000e+00 NA NA
## strata(epi)epi=13:LastPromoted 1.451e+01 1.996e+06 2.968e+03 0.005 0.99610
## strata(epi)epi=14:LastPromoted 1.464e+01 2.287e+06 2.911e+03 0.005 0.99599
## strata(epi)epi=15:LastPromoted 1.423e+01 1.508e+06 4.021e+03 0.004 0.99718
## strata(epi)epi=16:LastPromoted 1.515e+01 3.787e+06 3.936e+03 0.004 0.99693
## strata(epi)epi=17:LastPromoted 1.461e+01 2.219e+06 3.941e+03 0.004 0.99704
## strata(epi)epi=18:LastPromoted 1.272e+01 3.344e+05 4.838e+03 0.003 0.99790
## strata(epi)epi=19:LastPromoted 1.282e+01 3.703e+05 5.237e+03 0.002 0.99805
## strata(epi)epi=20:LastPromoted 1.282e+01 3.689e+05 5.275e+03 0.002 0.99806
## strata(epi)epi=21:LastPromoted 1.329e+01 5.910e+05 4.490e+03 0.003 0.99764
## strata(epi)epi=22:LastPromoted 1.489e+01 2.936e+06 5.014e+03 0.003 0.99763
## strata(epi)epi=23:LastPromoted 1.055e+01 3.801e+04 4.476e+03 0.002 0.99812
## strata(epi)epi=24:LastPromoted 1.536e+01 4.682e+06 4.648e+03 0.003 0.99736
## strata(epi)epi=25:LastPromoted NA NA 0.000e+00 NA NA
## strata(epi)epi=26:LastPromoted NA NA 0.000e+00 NA NA
## strata(epi)epi=27:LastPromoted NA NA 0.000e+00 NA NA
## strata(epi)epi=28:LastPromoted NA NA 0.000e+00 NA NA
## strata(epi)epi=29:LastPromoted NA NA 0.000e+00 NA NA
## strata(epi)epi=30:LastPromoted NA NA 0.000e+00 NA NA
## strata(epi)epi=31:LastPromoted 1.531e+01 4.471e+06 5.385e+03 0.003 0.99773
## strata(epi)epi=32:LastPromoted 1.647e+01 1.418e+07 5.691e+03 0.003 0.99769
## strata(epi)epi=33:LastPromoted NA NA 0.000e+00 NA NA
## strata(epi)epi=34:LastPromoted NA NA 0.000e+00 NA NA
## strata(epi)epi=35:LastPromoted NA NA 0.000e+00 NA NA
## strata(epi)epi=36:LastPromoted NA NA 0.000e+00 NA NA
## strata(epi)epi=37:LastPromoted NA NA 0.000e+00 NA NA
## strata(epi)epi=38:LastPromoted NA NA 0.000e+00 NA NA
## strata(epi)epi=39:LastPromoted NA NA 0.000e+00 NA NA
## strata(epi)epi=40:LastPromoted NA NA 0.000e+00 NA NA
## strata(epi)epi=2:SameRole 1.562e+00 4.770e+00 8.856e-01 1.764 0.07773
## strata(epi)epi=3:SameRole 1.627e+01 1.159e+07 1.027e+03 0.016 0.98736
## strata(epi)epi=4:SameRole 1.592e+01 8.186e+06 1.125e+03 0.014 0.98871
## strata(epi)epi=5:SameRole 1.606e+01 9.428e+06 1.156e+03 0.014 0.98891
## strata(epi)epi=6:SameRole 1.616e+01 1.045e+07 1.693e+03 0.010 0.99238
## strata(epi)epi=7:SameRole 1.597e+01 8.651e+06 1.587e+03 0.010 0.99197
## strata(epi)epi=8:SameRole 1.543e+01 5.041e+06 1.496e+03 0.010 0.99177
## strata(epi)epi=9:SameRole 1.503e+01 3.355e+06 1.593e+03 0.009 0.99248
## strata(epi)epi=10:SameRole 1.294e+00 3.647e+00 1.117e+00 1.158 0.24694
## strata(epi)epi=11:SameRole 1.448e+01 1.934e+06 2.706e+03 0.005 0.99573
## strata(epi)epi=12:SameRole NA NA 0.000e+00 NA NA
## strata(epi)epi=13:SameRole 1.551e+01 5.450e+06 3.305e+03 0.005 0.99626
## strata(epi)epi=14:SameRole 1.529e+01 4.365e+06 3.094e+03 0.005 0.99606
## strata(epi)epi=15:SameRole 1.304e+01 4.604e+05 4.484e+03 0.003 0.99768
## strata(epi)epi=16:SameRole 1.616e+01 1.040e+07 4.906e+03 0.003 0.99737
## strata(epi)epi=17:SameRole 1.333e+01 6.159e+05 4.460e+03 0.003 0.99762
## strata(epi)epi=18:SameRole 1.510e+01 3.601e+06 5.719e+03 0.003 0.99789
## strata(epi)epi=19:SameRole 1.484e+01 2.774e+06 6.121e+03 0.002 0.99807
## strata(epi)epi=20:SameRole 1.422e+01 1.501e+06 5.989e+03 0.002 0.99811
## strata(epi)epi=21:SameRole 1.480e+01 2.676e+06 4.953e+03 0.003 0.99762
## strata(epi)epi=22:SameRole 1.445e+01 1.893e+06 4.609e+03 0.003 0.99750
## strata(epi)epi=23:SameRole 1.360e+01 8.065e+05 4.822e+03 0.003 0.99775
## strata(epi)epi=24:SameRole 1.520e+01 3.994e+06 4.205e+03 0.004 0.99712
## strata(epi)epi=25:SameRole NA NA 0.000e+00 NA NA
## strata(epi)epi=26:SameRole NA NA 0.000e+00 NA NA
## strata(epi)epi=27:SameRole NA NA 0.000e+00 NA NA
## strata(epi)epi=28:SameRole NA NA 0.000e+00 NA NA
## strata(epi)epi=29:SameRole NA NA 0.000e+00 NA NA
## strata(epi)epi=30:SameRole NA NA 0.000e+00 NA NA
## strata(epi)epi=31:SameRole NA NA 0.000e+00 NA NA
## strata(epi)epi=32:SameRole NA NA 0.000e+00 NA NA
## strata(epi)epi=33:SameRole NA NA 0.000e+00 NA NA
## strata(epi)epi=34:SameRole NA NA 0.000e+00 NA NA
## strata(epi)epi=35:SameRole NA NA 0.000e+00 NA NA
## strata(epi)epi=36:SameRole NA NA 0.000e+00 NA NA
## strata(epi)epi=37:SameRole NA NA 0.000e+00 NA NA
## strata(epi)epi=38:SameRole NA NA 0.000e+00 NA NA
## strata(epi)epi=39:SameRole NA NA 0.000e+00 NA NA
## strata(epi)epi=40:SameRole NA NA 0.000e+00 NA NA
## strata(epi)epi=2:SameManager 4.946e-01 1.640e+00 6.887e-01 0.718 0.47266
## strata(epi)epi=3:SameManager 1.602e+00 4.962e+00 1.102e+00 1.453 0.14619
## strata(epi)epi=4:SameManager 1.210e+00 3.354e+00 1.106e+00 1.094 0.27378
## strata(epi)epi=5:SameManager -4.211e-01 6.563e-01 6.893e-01 -0.611 0.54129
## strata(epi)epi=6:SameManager 1.172e-01 1.124e+00 1.143e+00 0.103 0.91829
## strata(epi)epi=7:SameManager -9.793e-01 3.756e-01 8.828e-01 -1.109 0.26730
## strata(epi)epi=8:SameManager 1.396e+01 1.152e+06 1.519e+03 0.009 0.99267
## strata(epi)epi=9:SameManager 1.392e+01 1.110e+06 1.573e+03 0.009 0.99294
## strata(epi)epi=10:SameManager 1.431e+01 1.640e+06 1.108e+03 0.013 0.98970
## strata(epi)epi=11:SameManager 1.327e+01 5.781e+05 2.733e+03 0.005 0.99613
## strata(epi)epi=12:SameManager NA NA 0.000e+00 NA NA
## strata(epi)epi=13:SameManager -2.743e+00 6.439e-02 1.523e+00 -1.801 0.07168
## strata(epi)epi=14:SameManager 1.386e+01 1.045e+06 3.265e+03 0.004 0.99661
## strata(epi)epi=15:SameManager 1.381e+01 9.911e+05 4.679e+03 0.003 0.99765
## strata(epi)epi=16:SameManager 1.347e+01 7.108e+05 4.803e+03 0.003 0.99776
## strata(epi)epi=17:SameManager 1.413e+01 1.365e+06 4.442e+03 0.003 0.99746
## strata(epi)epi=18:SameManager 1.376e+01 9.440e+05 5.529e+03 0.002 0.99801
## strata(epi)epi=19:SameManager 1.396e+01 1.155e+06 5.711e+03 0.002 0.99805
## strata(epi)epi=20:SameManager 1.317e+01 5.239e+05 6.239e+03 0.002 0.99832
## strata(epi)epi=21:SameManager 1.239e+01 2.412e+05 5.167e+03 0.002 0.99809
## strata(epi)epi=22:SameManager -2.092e+00 1.234e-01 7.779e+03 0.000 0.99979
## strata(epi)epi=23:SameManager 1.295e+01 4.198e+05 5.173e+03 0.003 0.99800
## strata(epi)epi=24:SameManager 1.447e+01 1.922e+06 7.653e+03 0.002 0.99849
## strata(epi)epi=25:SameManager NA NA 0.000e+00 NA NA
## strata(epi)epi=26:SameManager NA NA 0.000e+00 NA NA
## strata(epi)epi=27:SameManager NA NA 0.000e+00 NA NA
## strata(epi)epi=28:SameManager NA NA 0.000e+00 NA NA
## strata(epi)epi=29:SameManager NA NA 0.000e+00 NA NA
## strata(epi)epi=30:SameManager NA NA 0.000e+00 NA NA
## strata(epi)epi=31:SameManager 1.661e+01 1.636e+07 9.138e+03 0.002 0.99855
## strata(epi)epi=32:SameManager 1.966e+01 3.465e+08 1.590e+04 0.001 0.99901
## strata(epi)epi=33:SameManager 1.883e+01 1.505e+08 1.467e+04 0.001 0.99898
## strata(epi)epi=34:SameManager NA NA 0.000e+00 NA NA
## strata(epi)epi=35:SameManager NA NA 0.000e+00 NA NA
## strata(epi)epi=36:SameManager NA NA 0.000e+00 NA NA
## strata(epi)epi=37:SameManager NA NA 0.000e+00 NA NA
## strata(epi)epi=38:SameManager NA NA 0.000e+00 NA NA
## strata(epi)epi=39:SameManager NA NA 0.000e+00 NA NA
## strata(epi)epi=40:SameManager NA NA 0.000e+00 NA NA
## strata(epi)epi=2:Gender 1.815e-01 1.199e+00 4.699e-01 0.386 0.69933
## strata(epi)epi=3:Gender 5.711e-02 1.059e+00 5.298e-01 0.108 0.91415
## strata(epi)epi=4:Gender -1.580e-01 8.538e-01 5.779e-01 -0.273 0.78452
## strata(epi)epi=5:Gender 2.643e-01 1.302e+00 5.063e-01 0.522 0.60169
## strata(epi)epi=6:Gender -7.991e-02 9.232e-01 7.517e-01 -0.106 0.91534
## strata(epi)epi=7:Gender 3.275e-01 1.387e+00 6.545e-01 0.500 0.61684
## strata(epi)epi=8:Gender 1.951e-01 1.215e+00 7.158e-01 0.273 0.78515
## strata(epi)epi=9:Gender 5.590e-01 1.749e+00 7.511e-01 0.744 0.45671
## strata(epi)epi=10:Gender -1.287e-01 8.792e-01 5.615e-01 -0.229 0.81867
## strata(epi)epi=11:Gender 1.616e-01 1.175e+00 1.437e+00 0.112 0.91046
## strata(epi)epi=12:Gender NA NA 0.000e+00 NA NA
## strata(epi)epi=13:Gender 3.088e-01 1.362e+00 1.485e+00 0.208 0.83527
## strata(epi)epi=14:Gender -1.724e+01 3.267e-08 3.618e+03 -0.005 0.99620
## strata(epi)epi=15:Gender 1.642e+01 1.353e+07 4.342e+03 0.004 0.99698
## strata(epi)epi=16:Gender -1.748e+01 2.553e-08 4.967e+03 -0.004 0.99719
## strata(epi)epi=17:Gender 1.653e+01 1.515e+07 4.183e+03 0.004 0.99685
## strata(epi)epi=18:Gender -1.674e+01 5.378e-08 5.206e+03 -0.003 0.99743
## strata(epi)epi=19:Gender -1.669e+01 5.657e-08 5.210e+03 -0.003 0.99744
## strata(epi)epi=20:Gender -1.686e+01 4.781e-08 5.124e+03 -0.003 0.99738
## strata(epi)epi=21:Gender -1.705e+01 3.929e-08 5.167e+03 -0.003 0.99737
## strata(epi)epi=22:Gender 1.756e+01 4.243e+07 4.759e+03 0.004 0.99706
## strata(epi)epi=23:Gender -1.541e+01 2.035e-07 5.259e+03 -0.003 0.99766
## strata(epi)epi=24:Gender 1.824e+01 8.344e+07 5.059e+03 0.004 0.99712
## strata(epi)epi=25:Gender NA NA 0.000e+00 NA NA
## strata(epi)epi=26:Gender NA NA 0.000e+00 NA NA
## strata(epi)epi=27:Gender NA NA 0.000e+00 NA NA
## strata(epi)epi=28:Gender NA NA 0.000e+00 NA NA
## strata(epi)epi=29:Gender NA NA 0.000e+00 NA NA
## strata(epi)epi=30:Gender NA NA 0.000e+00 NA NA
## strata(epi)epi=31:Gender -1.514e+01 2.666e-07 6.215e+03 -0.002 0.99806
## strata(epi)epi=32:Gender 2.020e+01 5.912e+08 8.838e+03 0.002 0.99818
## strata(epi)epi=33:Gender 1.994e+01 4.592e+08 1.606e+04 0.001 0.99901
## strata(epi)epi=34:Gender NA NA 0.000e+00 NA NA
## strata(epi)epi=35:Gender NA NA 0.000e+00 NA NA
## strata(epi)epi=36:Gender NA NA 0.000e+00 NA NA
## strata(epi)epi=37:Gender NA NA 0.000e+00 NA NA
## strata(epi)epi=38:Gender NA NA 0.000e+00 NA NA
## strata(epi)epi=39:Gender NA NA 0.000e+00 NA NA
## strata(epi)epi=40:Gender NA NA 0.000e+00 NA NA
##
## SameRole
## LastPromoted ***
## SameManager
## Gender
## MonthlyIncome ***
## Age ***
## NumCompaniesWorked ***
## JobInvolvement ***
## EnvironmentSatisfaction ***
## JobSatisfaction ***
## TrainingTimesLastYear *
## DistanceFromHome **
## strata(epi)epi=2:LastPromoted *
## strata(epi)epi=3:LastPromoted
## strata(epi)epi=4:LastPromoted
## strata(epi)epi=5:LastPromoted
## strata(epi)epi=6:LastPromoted *
## strata(epi)epi=7:LastPromoted
## strata(epi)epi=8:LastPromoted
## strata(epi)epi=9:LastPromoted
## strata(epi)epi=10:LastPromoted
## strata(epi)epi=11:LastPromoted
## strata(epi)epi=12:LastPromoted
## strata(epi)epi=13:LastPromoted
## strata(epi)epi=14:LastPromoted
## strata(epi)epi=15:LastPromoted
## strata(epi)epi=16:LastPromoted
## strata(epi)epi=17:LastPromoted
## strata(epi)epi=18:LastPromoted
## strata(epi)epi=19:LastPromoted
## strata(epi)epi=20:LastPromoted
## strata(epi)epi=21:LastPromoted
## strata(epi)epi=22:LastPromoted
## strata(epi)epi=23:LastPromoted
## strata(epi)epi=24:LastPromoted
## strata(epi)epi=25:LastPromoted
## strata(epi)epi=26:LastPromoted
## strata(epi)epi=27:LastPromoted
## strata(epi)epi=28:LastPromoted
## strata(epi)epi=29:LastPromoted
## strata(epi)epi=30:LastPromoted
## strata(epi)epi=31:LastPromoted
## strata(epi)epi=32:LastPromoted
## strata(epi)epi=33:LastPromoted
## strata(epi)epi=34:LastPromoted
## strata(epi)epi=35:LastPromoted
## strata(epi)epi=36:LastPromoted
## strata(epi)epi=37:LastPromoted
## strata(epi)epi=38:LastPromoted
## strata(epi)epi=39:LastPromoted
## strata(epi)epi=40:LastPromoted
## strata(epi)epi=2:SameRole .
## strata(epi)epi=3:SameRole
## strata(epi)epi=4:SameRole
## strata(epi)epi=5:SameRole
## strata(epi)epi=6:SameRole
## strata(epi)epi=7:SameRole
## strata(epi)epi=8:SameRole
## strata(epi)epi=9:SameRole
## strata(epi)epi=10:SameRole
## strata(epi)epi=11:SameRole
## strata(epi)epi=12:SameRole
## strata(epi)epi=13:SameRole
## strata(epi)epi=14:SameRole
## strata(epi)epi=15:SameRole
## strata(epi)epi=16:SameRole
## strata(epi)epi=17:SameRole
## strata(epi)epi=18:SameRole
## strata(epi)epi=19:SameRole
## strata(epi)epi=20:SameRole
## strata(epi)epi=21:SameRole
## strata(epi)epi=22:SameRole
## strata(epi)epi=23:SameRole
## strata(epi)epi=24:SameRole
## strata(epi)epi=25:SameRole
## strata(epi)epi=26:SameRole
## strata(epi)epi=27:SameRole
## strata(epi)epi=28:SameRole
## strata(epi)epi=29:SameRole
## strata(epi)epi=30:SameRole
## strata(epi)epi=31:SameRole
## strata(epi)epi=32:SameRole
## strata(epi)epi=33:SameRole
## strata(epi)epi=34:SameRole
## strata(epi)epi=35:SameRole
## strata(epi)epi=36:SameRole
## strata(epi)epi=37:SameRole
## strata(epi)epi=38:SameRole
## strata(epi)epi=39:SameRole
## strata(epi)epi=40:SameRole
## strata(epi)epi=2:SameManager
## strata(epi)epi=3:SameManager
## strata(epi)epi=4:SameManager
## strata(epi)epi=5:SameManager
## strata(epi)epi=6:SameManager
## strata(epi)epi=7:SameManager
## strata(epi)epi=8:SameManager
## strata(epi)epi=9:SameManager
## strata(epi)epi=10:SameManager
## strata(epi)epi=11:SameManager
## strata(epi)epi=12:SameManager
## strata(epi)epi=13:SameManager .
## strata(epi)epi=14:SameManager
## strata(epi)epi=15:SameManager
## strata(epi)epi=16:SameManager
## strata(epi)epi=17:SameManager
## strata(epi)epi=18:SameManager
## strata(epi)epi=19:SameManager
## strata(epi)epi=20:SameManager
## strata(epi)epi=21:SameManager
## strata(epi)epi=22:SameManager
## strata(epi)epi=23:SameManager
## strata(epi)epi=24:SameManager
## strata(epi)epi=25:SameManager
## strata(epi)epi=26:SameManager
## strata(epi)epi=27:SameManager
## strata(epi)epi=28:SameManager
## strata(epi)epi=29:SameManager
## strata(epi)epi=30:SameManager
## strata(epi)epi=31:SameManager
## strata(epi)epi=32:SameManager
## strata(epi)epi=33:SameManager
## strata(epi)epi=34:SameManager
## strata(epi)epi=35:SameManager
## strata(epi)epi=36:SameManager
## strata(epi)epi=37:SameManager
## strata(epi)epi=38:SameManager
## strata(epi)epi=39:SameManager
## strata(epi)epi=40:SameManager
## strata(epi)epi=2:Gender
## strata(epi)epi=3:Gender
## strata(epi)epi=4:Gender
## strata(epi)epi=5:Gender
## strata(epi)epi=6:Gender
## strata(epi)epi=7:Gender
## strata(epi)epi=8:Gender
## strata(epi)epi=9:Gender
## strata(epi)epi=10:Gender
## strata(epi)epi=11:Gender
## strata(epi)epi=12:Gender
## strata(epi)epi=13:Gender
## strata(epi)epi=14:Gender
## strata(epi)epi=15:Gender
## strata(epi)epi=16:Gender
## strata(epi)epi=17:Gender
## strata(epi)epi=18:Gender
## strata(epi)epi=19:Gender
## strata(epi)epi=20:Gender
## strata(epi)epi=21:Gender
## strata(epi)epi=22:Gender
## strata(epi)epi=23:Gender
## strata(epi)epi=24:Gender
## strata(epi)epi=25:Gender
## strata(epi)epi=26:Gender
## strata(epi)epi=27:Gender
## strata(epi)epi=28:Gender
## strata(epi)epi=29:Gender
## strata(epi)epi=30:Gender
## strata(epi)epi=31:Gender
## strata(epi)epi=32:Gender
## strata(epi)epi=33:Gender
## strata(epi)epi=34:Gender
## strata(epi)epi=35:Gender
## strata(epi)epi=36:Gender
## strata(epi)epi=37:Gender
## strata(epi)epi=38:Gender
## strata(epi)epi=39:Gender
## strata(epi)epi=40:Gender
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## exp(coef) exp(-coef) lower .95 upper .95
## SameRole 5.036e-01 1.986e+00 0.219550 1.1552
## LastPromoted 4.478e+00 2.233e-01 2.165516 9.2587
## SameManager 1.076e+00 9.293e-01 0.494407 2.3423
## Gender 8.167e-01 1.224e+00 0.504763 1.3213
## MonthlyIncome 9.998e-01 1.000e+00 0.999747 0.9999
## Age 9.468e-01 1.056e+00 0.928075 0.9660
## NumCompaniesWorked 1.150e+00 8.693e-01 1.094518 1.2090
## JobInvolvement 6.452e-01 1.550e+00 0.544865 0.7639
## EnvironmentSatisfaction 7.928e-01 1.261e+00 0.705446 0.8910
## JobSatisfaction 7.716e-01 1.296e+00 0.687809 0.8657
## TrainingTimesLastYear 8.710e-01 1.148e+00 0.784027 0.9676
## DistanceFromHome 1.020e+00 9.807e-01 1.004844 1.0347
## strata(epi)epi=2:LastPromoted 4.692e+00 2.131e-01 1.102064 19.9775
## strata(epi)epi=3:LastPromoted 1.040e+00 9.616e-01 0.328109 3.2960
## strata(epi)epi=4:LastPromoted 6.528e-01 1.532e+00 0.204850 2.0802
## strata(epi)epi=5:LastPromoted 6.220e-01 1.608e+00 0.200352 1.9312
## strata(epi)epi=6:LastPromoted 1.750e-01 5.716e+00 0.036277 0.8437
## strata(epi)epi=7:LastPromoted 1.406e+00 7.111e-01 0.255733 7.7325
## strata(epi)epi=8:LastPromoted 1.828e+00 5.470e-01 0.201379 16.5961
## strata(epi)epi=9:LastPromoted 6.348e-01 1.575e+00 0.109028 3.6965
## strata(epi)epi=10:LastPromoted 8.866e-01 1.128e+00 0.210346 3.7368
## strata(epi)epi=11:LastPromoted 1.476e+06 6.774e-07 0.000000 Inf
## strata(epi)epi=12:LastPromoted NA NA NA NA
## strata(epi)epi=13:LastPromoted 1.996e+06 5.010e-07 0.000000 Inf
## strata(epi)epi=14:LastPromoted 2.287e+06 4.373e-07 0.000000 Inf
## strata(epi)epi=15:LastPromoted 1.508e+06 6.631e-07 0.000000 Inf
## strata(epi)epi=16:LastPromoted 3.787e+06 2.640e-07 0.000000 Inf
## strata(epi)epi=17:LastPromoted 2.219e+06 4.507e-07 0.000000 Inf
## strata(epi)epi=18:LastPromoted 3.344e+05 2.990e-06 0.000000 Inf
## strata(epi)epi=19:LastPromoted 3.703e+05 2.700e-06 0.000000 Inf
## strata(epi)epi=20:LastPromoted 3.689e+05 2.711e-06 0.000000 Inf
## strata(epi)epi=21:LastPromoted 5.910e+05 1.692e-06 0.000000 Inf
## strata(epi)epi=22:LastPromoted 2.936e+06 3.406e-07 0.000000 Inf
## strata(epi)epi=23:LastPromoted 3.801e+04 2.631e-05 0.000000 Inf
## strata(epi)epi=24:LastPromoted 4.682e+06 2.136e-07 0.000000 Inf
## strata(epi)epi=25:LastPromoted NA NA NA NA
## strata(epi)epi=26:LastPromoted NA NA NA NA
## strata(epi)epi=27:LastPromoted NA NA NA NA
## strata(epi)epi=28:LastPromoted NA NA NA NA
## strata(epi)epi=29:LastPromoted NA NA NA NA
## strata(epi)epi=30:LastPromoted NA NA NA NA
## strata(epi)epi=31:LastPromoted 4.471e+06 2.237e-07 0.000000 Inf
## strata(epi)epi=32:LastPromoted 1.418e+07 7.054e-08 0.000000 Inf
## strata(epi)epi=33:LastPromoted NA NA NA NA
## strata(epi)epi=34:LastPromoted NA NA NA NA
## strata(epi)epi=35:LastPromoted NA NA NA NA
## strata(epi)epi=36:LastPromoted NA NA NA NA
## strata(epi)epi=37:LastPromoted NA NA NA NA
## strata(epi)epi=38:LastPromoted NA NA NA NA
## strata(epi)epi=39:LastPromoted NA NA NA NA
## strata(epi)epi=40:LastPromoted NA NA NA NA
## strata(epi)epi=2:SameRole 4.770e+00 2.097e-01 0.840662 27.0601
## strata(epi)epi=3:SameRole 1.159e+07 8.629e-08 0.000000 Inf
## strata(epi)epi=4:SameRole 8.186e+06 1.222e-07 0.000000 Inf
## strata(epi)epi=5:SameRole 9.428e+06 1.061e-07 0.000000 Inf
## strata(epi)epi=6:SameRole 1.045e+07 9.567e-08 0.000000 Inf
## strata(epi)epi=7:SameRole 8.651e+06 1.156e-07 0.000000 Inf
## strata(epi)epi=8:SameRole 5.041e+06 1.984e-07 0.000000 Inf
## strata(epi)epi=9:SameRole 3.355e+06 2.980e-07 0.000000 Inf
## strata(epi)epi=10:SameRole 3.647e+00 2.742e-01 0.408042 32.5914
## strata(epi)epi=11:SameRole 1.934e+06 5.171e-07 0.000000 Inf
## strata(epi)epi=12:SameRole NA NA NA NA
## strata(epi)epi=13:SameRole 5.450e+06 1.835e-07 0.000000 Inf
## strata(epi)epi=14:SameRole 4.365e+06 2.291e-07 0.000000 Inf
## strata(epi)epi=15:SameRole 4.604e+05 2.172e-06 0.000000 Inf
## strata(epi)epi=16:SameRole 1.040e+07 9.615e-08 0.000000 Inf
## strata(epi)epi=17:SameRole 6.159e+05 1.624e-06 0.000000 Inf
## strata(epi)epi=18:SameRole 3.601e+06 2.777e-07 0.000000 Inf
## strata(epi)epi=19:SameRole 2.774e+06 3.604e-07 0.000000 Inf
## strata(epi)epi=20:SameRole 1.501e+06 6.664e-07 0.000000 Inf
## strata(epi)epi=21:SameRole 2.676e+06 3.736e-07 0.000000 Inf
## strata(epi)epi=22:SameRole 1.893e+06 5.284e-07 0.000000 Inf
## strata(epi)epi=23:SameRole 8.065e+05 1.240e-06 0.000000 Inf
## strata(epi)epi=24:SameRole 3.994e+06 2.504e-07 0.000000 Inf
## strata(epi)epi=25:SameRole NA NA NA NA
## strata(epi)epi=26:SameRole NA NA NA NA
## strata(epi)epi=27:SameRole NA NA NA NA
## strata(epi)epi=28:SameRole NA NA NA NA
## strata(epi)epi=29:SameRole NA NA NA NA
## strata(epi)epi=30:SameRole NA NA NA NA
## strata(epi)epi=31:SameRole NA NA NA NA
## strata(epi)epi=32:SameRole NA NA NA NA
## strata(epi)epi=33:SameRole NA NA NA NA
## strata(epi)epi=34:SameRole NA NA NA NA
## strata(epi)epi=35:SameRole NA NA NA NA
## strata(epi)epi=36:SameRole NA NA NA NA
## strata(epi)epi=37:SameRole NA NA NA NA
## strata(epi)epi=38:SameRole NA NA NA NA
## strata(epi)epi=39:SameRole NA NA NA NA
## strata(epi)epi=40:SameRole NA NA NA NA
## strata(epi)epi=2:SameManager 1.640e+00 6.098e-01 0.425163 6.3251
## strata(epi)epi=3:SameManager 4.962e+00 2.015e-01 0.571970 43.0415
## strata(epi)epi=4:SameManager 3.354e+00 2.981e-01 0.383976 29.3020
## strata(epi)epi=5:SameManager 6.563e-01 1.524e+00 0.169971 2.5344
## strata(epi)epi=6:SameManager 1.124e+00 8.894e-01 0.119739 10.5582
## strata(epi)epi=7:SameManager 3.756e-01 2.663e+00 0.066559 2.1191
## strata(epi)epi=8:SameManager 1.152e+06 8.678e-07 0.000000 Inf
## strata(epi)epi=9:SameManager 1.110e+06 9.006e-07 0.000000 Inf
## strata(epi)epi=10:SameManager 1.640e+06 6.097e-07 0.000000 Inf
## strata(epi)epi=11:SameManager 5.781e+05 1.730e-06 0.000000 Inf
## strata(epi)epi=12:SameManager NA NA NA NA
## strata(epi)epi=13:SameManager 6.439e-02 1.553e+01 0.003255 1.2736
## strata(epi)epi=14:SameManager 1.045e+06 9.569e-07 0.000000 Inf
## strata(epi)epi=15:SameManager 9.911e+05 1.009e-06 0.000000 Inf
## strata(epi)epi=16:SameManager 7.108e+05 1.407e-06 0.000000 Inf
## strata(epi)epi=17:SameManager 1.365e+06 7.324e-07 0.000000 Inf
## strata(epi)epi=18:SameManager 9.440e+05 1.059e-06 0.000000 Inf
## strata(epi)epi=19:SameManager 1.155e+06 8.660e-07 0.000000 Inf
## strata(epi)epi=20:SameManager 5.239e+05 1.909e-06 0.000000 Inf
## strata(epi)epi=21:SameManager 2.412e+05 4.146e-06 0.000000 Inf
## strata(epi)epi=22:SameManager 1.234e-01 8.102e+00 0.000000 Inf
## strata(epi)epi=23:SameManager 4.198e+05 2.382e-06 0.000000 Inf
## strata(epi)epi=24:SameManager 1.922e+06 5.203e-07 0.000000 Inf
## strata(epi)epi=25:SameManager NA NA NA NA
## strata(epi)epi=26:SameManager NA NA NA NA
## strata(epi)epi=27:SameManager NA NA NA NA
## strata(epi)epi=28:SameManager NA NA NA NA
## strata(epi)epi=29:SameManager NA NA NA NA
## strata(epi)epi=30:SameManager NA NA NA NA
## strata(epi)epi=31:SameManager 1.636e+07 6.111e-08 0.000000 Inf
## strata(epi)epi=32:SameManager 3.465e+08 2.886e-09 0.000000 Inf
## strata(epi)epi=33:SameManager 1.505e+08 6.643e-09 0.000000 Inf
## strata(epi)epi=34:SameManager NA NA NA NA
## strata(epi)epi=35:SameManager NA NA NA NA
## strata(epi)epi=36:SameManager NA NA NA NA
## strata(epi)epi=37:SameManager NA NA NA NA
## strata(epi)epi=38:SameManager NA NA NA NA
## strata(epi)epi=39:SameManager NA NA NA NA
## strata(epi)epi=40:SameManager NA NA NA NA
## strata(epi)epi=2:Gender 1.199e+00 8.340e-01 0.477384 3.0113
## strata(epi)epi=3:Gender 1.059e+00 9.445e-01 0.374842 2.9906
## strata(epi)epi=4:Gender 8.538e-01 1.171e+00 0.275107 2.6500
## strata(epi)epi=5:Gender 1.302e+00 7.678e-01 0.482852 3.5134
## strata(epi)epi=6:Gender 9.232e-01 1.083e+00 0.211551 4.0288
## strata(epi)epi=7:Gender 1.387e+00 7.207e-01 0.384667 5.0045
## strata(epi)epi=8:Gender 1.215e+00 8.227e-01 0.298875 4.9431
## strata(epi)epi=9:Gender 1.749e+00 5.718e-01 0.401288 7.6224
## strata(epi)epi=10:Gender 8.792e-01 1.137e+00 0.292543 2.6424
## strata(epi)epi=11:Gender 1.175e+00 8.508e-01 0.070297 19.6532
## strata(epi)epi=12:Gender NA NA NA NA
## strata(epi)epi=13:Gender 1.362e+00 7.343e-01 0.074163 25.0043
## strata(epi)epi=14:Gender 3.267e-08 3.061e+07 0.000000 Inf
## strata(epi)epi=15:Gender 1.353e+07 7.388e-08 0.000000 Inf
## strata(epi)epi=16:Gender 2.553e-08 3.917e+07 0.000000 Inf
## strata(epi)epi=17:Gender 1.515e+07 6.599e-08 0.000000 Inf
## strata(epi)epi=18:Gender 5.378e-08 1.859e+07 0.000000 Inf
## strata(epi)epi=19:Gender 5.657e-08 1.768e+07 0.000000 Inf
## strata(epi)epi=20:Gender 4.781e-08 2.091e+07 0.000000 Inf
## strata(epi)epi=21:Gender 3.929e-08 2.545e+07 0.000000 Inf
## strata(epi)epi=22:Gender 4.243e+07 2.357e-08 0.000000 Inf
## strata(epi)epi=23:Gender 2.035e-07 4.914e+06 0.000000 Inf
## strata(epi)epi=24:Gender 8.344e+07 1.199e-08 0.000000 Inf
## strata(epi)epi=25:Gender NA NA NA NA
## strata(epi)epi=26:Gender NA NA NA NA
## strata(epi)epi=27:Gender NA NA NA NA
## strata(epi)epi=28:Gender NA NA NA NA
## strata(epi)epi=29:Gender NA NA NA NA
## strata(epi)epi=30:Gender NA NA NA NA
## strata(epi)epi=31:Gender 2.665e-07 3.752e+06 0.000000 Inf
## strata(epi)epi=32:Gender 5.912e+08 1.691e-09 0.000000 Inf
## strata(epi)epi=33:Gender 4.592e+08 2.178e-09 0.000000 Inf
## strata(epi)epi=34:Gender NA NA NA NA
## strata(epi)epi=35:Gender NA NA NA NA
## strata(epi)epi=36:Gender NA NA NA NA
## strata(epi)epi=37:Gender NA NA NA NA
## strata(epi)epi=38:Gender NA NA NA NA
## strata(epi)epi=39:Gender NA NA NA NA
## strata(epi)epi=40:Gender NA NA NA NA
##
## Concordance= 0.858 (se = 0.013 )
## Likelihood ratio test= 511.3 on 108 df, p=<2e-16
## Wald test = 200.5 on 108 df, p=2e-07
## Score (logrank) test = 471.7 on 108 df, p=<2e-16
Interaction terms between the intermediate events and the stratified
episodes had many NAs purely because not all of the episodes had any of
these intermediate events; however, in the episodes that did, the effect
of treatment did not differ, especially in the later episodes: the
effect was about as extreme the longer people were in these roles, with
these managers, or hadn’t been promoted. The Gender
covariate remains insignificant in the interaction model, including its
interaction with the episodes. Overall, there are other covariates with
far bigger impact on employee attrition.
This survival analysis has demonstrated that for companies to maintain employee retention at their firms, they should focus on making employees happy in their environment and jobs, providing them with upward mobility as well as different roles in the company. In general, people do not want to be stuck in the same position for long amounts of time; they want to be able to experience new things by either being in new places, being with new people, or by doing different things. Ultimately, a company is only as good as the sum of its parts: if employees are happy, they can be more productive and accomplish the initiatives the company has set out to achieve. In addition, the happier employees are, the more likely the company will be lauded as a great place to work, attracting new talent to the company. Then and only then can a company be good enough to retain all of this talent that it has amassed and work to make the best products or services possible.
Stacker IV, McKinley. “SAMPLE DATA: HR Employee Attrition and Performance.” IBM Watson Analytics, IBM, 14 Sept. 2015, https://www.ibm.com/communities/analytics/watson-analytics-blog/hr-employee-attrition/.