1. Learn
  2. /
  3. Courses
  4. /
  5. HR Analytics: Predicting Employee Churn in R

Exercise

Deriving Compa-level

Compa-ratio of greater than 1 implies the employee is paid above the median compensation, thus ensuring competitive pay.

Based on compa-ratio, you will calculate compa_level as:

  • "Above", if compa-ratio is greater than 1
  • "Below", otherwise

Instructions

100 XP
  • Use compa_ratio to derive compa_level as per the condition mentioned above.
  • Create a bar chart of compa_level for active and inactive employees.