Compensation

HR Analytics: Predicting Employee Churn in R

Abhishek Trehan

People Analytics Practitioner

Compensation matters

HR Analytics: Predicting Employee Churn in R

Exploring compensation variable

# Plot the distribution of compensation
ggplot(emp_tenure, aes(x = compensation)) + 
  geom_histogram()

HR Analytics: Predicting Employee Churn in R

Exploring compensation variable

# Plot the distribution of compensation across levels
ggplot(emp_tenure, 
       aes(x = level, y = compensation)) + 
  geom_boxplot()

HR Analytics: Predicting Employee Churn in R

Deriving Compa-ratio

$$ \text{Compa Ratio} = \frac{\text{ Actual Compensation }}{\text{Median Compensation}} $$

HR Analytics: Predicting Employee Churn in R

Deriving Compa-ratio

  • Compa-ratio of 1.2 or 120% means that the employee is paid 20% above the median pay

  • Compa-ratio of 1 or 100% means that the employee is paid exactly the median pay

  • Compa-ratio of 0.8 or 80% means that the employee is paid 20% below the median pay

HR Analytics: Predicting Employee Churn in R

Deriving median compensation & compa-ratio

# Derive Compa-ratio
emp_compa_ratio <- emp_tenure %>%  
  group_by(level) %>%   
  mutate(median_compensation = median(compensation), 
         compa_ratio = (compensation / median_compensation))
# Look at the median compensation for each level        
emp_compa_ratio %>% 
  distinct(level, median_compensation)
# A tibble: 2 x 2
# Groups:     level[2]
  level      median_compensation
  <fct>                    <dbl>
1 Analyst                  51840
2 Specialist               83496
HR Analytics: Predicting Employee Churn in R

Deriving Compa-level

  • Compa-ratio > 1: Above
  • Otherwise: Below
HR Analytics: Predicting Employee Churn in R

Let's practice!

HR Analytics: Predicting Employee Churn in R

Preparing Video For Download...