class: center, middle, inverse, title-slide .title[ #
Logistic Regression for Employee Turnover Rates
] .subtitle[ ##
] .author[ ###
Ava DeStefano
] .institute[ ###
West Chester University of Pennsylvania
] .date[ ###
2/9/25
] --- class:inverse4, top <h1 align="center"> Agenda</h1> <BR> .pull-left[ - Introduction - Purpose - Variable Description -Practical Questions - Exploratory Analysis - Data Cleaning - Variable Discretion - Standardizing Variables - Model Building - Build Candidate Models ] .pull-right[ - Model Selection - final model output - Data Visualiztion - Summary and Conclusion ] --- <h1 align="left"> Introduction</h1> This data set was obtained from **kaggle.com**. The data set contains information on several thousand employees from an unnamed company. Since no details are given about the company, it cannot be said how exactly the data was collected. The response variable we are trying to predict is whether or no an employee stays at or leaves the company. - **Explanatory Variables**: variables that relate to the subject's work life - **Response variable**: Employee turnover --- name: Variable Descriptions <h1 align="left"> Variable Descriptions</h1> - **satisfaction_level (x1)** the employees self reported satisfaction level. (Numeric from 0-1) - **last_evaluation (x2)** the employees last performance review. (Numeric from 0-1) - **number_project (x3)** the number of projects an employee has done for the company. (Numeric) - **average_monthly_hours (x4)** the average number of hours an employee works per month. (Numeric) - **time_spend_company (x5)** how long the employee has worked at the company in years. (Numeric) - **Work_accident (x6)** number of work related accidents the employee has had. (Binary, 1=yes, 0=no) - **promotion_last_5years (x7)** Has the employee had a promotion in the last 5 years? (Binary 1=yes, 0=n0) - **Department (x8)** the department the employee is in. (categorical) - **Salary (x9)** salary level. (categorical) - **left (y)** whether the employee stays at or leaves the company (0=stay, 1=leave) --- name: rplot <h1 align="center"> Data Visualization</h1> <h3 align="center"> Relationship between employee self reported satisfaction, and company evaluation</h3> <img src="First-Ninja-Presentation_files/figure-html/plot-example-1.png" width="80%" height="80%" style="display: block; margin: auto;" /> --- <h1 align="left"> Model Candidates</h1> - ** Candiddate 1** Fulle Model - ** Candidate 2** Reduced Model - ** Candidate 3** Stepwise Model <h3 align="left"> In this analysis, we will be using logistic regression to calculate our models.</h3> $$ P(x|Y=1) = \frac{\exp(\beta_0+\beta_1x_1+\cdots+\beta_kx_k)}{1+\exp(\beta_0+\beta_1x_1+\cdots+\beta_kx_k)} $$ --- <h1 align="center"> Final Model Selection</h1> <h3 align="center"> R Summary Table for Candidate 2</h3> | Intercept | Estimate | z-value | p-value | |:----------:|:------------:|:-------------------:|:--------------------:| | Intercept |-3.42111 |-15.999 | < 2e-16 | | Promotion_last_5years | -1.05299 | -2.192 | 0.02838 | |satisfaction_level| -1.05082| -27.584| < 2e-16| | last_evaluation |0.10384 |2.685 |0.00726 | |average_monthly_hours |0.20248 |5.242 |1.58e-07 | |number_projects |-0.30664 |-8.018 | 1.07e-15| |salarylow |1.88500 |8.685 |< 2e-16 | |salarymedium |1.56548 | 7.172 |7.37e-13 | |Work_accident |-1.45271 |-10.213 |< 2e-16 | --- <h1 align="center"> Sources</h1> Slides created via the R packages: [**xaringan**](https://github.com/yihui/xaringan)<br> [gadenbuie/xaringanthemer](https://github.com/gadenbuie/xaringanthemer) The chakra comes from [remark.js](https://remarkjs.com), [**knitr**](http://yihui.name/knitr), and [R Markdown](https://rmarkdown.rstudio.com).