top of page

PREDICTING

PROBABILITY OF ATTRITION

LOGISTIC REGRESSION MODEL FITTING

in our data we have information about the people who had left the company and about the people who are still working. We will use this information to fit a logistic regression model to predict the probablity of attrition for a given employee given the related information associated with the employee. The dependent variable for the model is of course "attrition", which is a binary variable with "yes" and "no" outcome.

 

We will begin with all the variables in the model and then use the forward or backward selection method to select a good model.

 

R Code:

 

fullmod <- glm(Attrition ~ .,family = binomial,data=HR)

 

summary(fullmod)

 

Output:

 

 

 

 

The variables assiciated with non-significant p-value are - Age, Job Role, Marital Status, Monthly Income, Total Working Years.

Subscribe

Follow me:

  • Facebook Social Icon
  • LinkedIn Social Icon
bottom of page