Get startedGet started for free

Compensation

1. Compensation

Although career growth and development, work culture, quality of work, work-life balance are important in retaining employees, a key important factor driving employee turnover can be compensation for the services provided.

2. Compensation matters

All else being equal, compensation is one of the top drivers of employee turnover. Now let's explore compensation data which is stored in the compensation variable and analyze if compensation is driving turnover in our dataset.

3. Exploring compensation variable

By using geom_histogram() as the geom layer and supplying compensation as the x argument, you can create a histogram that shows the distribution of compensation for all employees.

4. Exploring compensation variable

Compensation is an outcome of employee experience, education, role, job level etc. This box plot shows us how compensation varies across and within levels. As you can see, there is a lot of variation within each level, so it's important to derive a new variable which provides a direction to understand how an employee is paid compared to the other. The median marks the mid-point of the data and is shown by the solid line that divides the box into two parts. Exactly 50 percent of employees earn less than the median and 50 percent make more.

5. Deriving Compa-ratio

Compa-ratio is the metric used to assess the competitiveness of an employee’s pay. It is calculated by dividing actual compensation by the median compensation. This metric helps us to identify which employees are earning significantly less or more compared to their peers.

6. Deriving Compa-ratio

In the given example, median compensation is fifty thousand US dollars. An employee who is earning sixty thousand is at 1.2 compa-ratio, in other words, it means that this employee is earning 20% more than the median, while someone who is at 0.8 compa-ratio is earning 20% less than the median.

7. Deriving median compensation & compa-ratio

To derive Compa-ratio, you first need to calculate the median compensation for each level and then divide the actual compensation with the median compensation. Here group_by() is used to group the data by level and then we use mutate() to calculate median compensation and compa-ratio at each level. You can also examine the median compensation at each level by using distinct() function from dplyr. In this example, you can see that Specialist median compensation is higher compared to Analyst median compensation.

8. Deriving Compa-level

Compa-ratio of 1 means that the employee's pay is exactly the same as the median pay for that level. In the following exercises, you will classify all employees whose compa-ratio is more than one as "Above" and "Below" otherwise. After this, you will generate a barplot to compare the compa-level of active and inactive employees.

9. Let's practice!

It's your turn to explore employee compensation.