IniziaInizia gratis

Deriving Compa-ratio

Employees always expect that they are paid fairly compared to their co-workers, and hence, maintaining internal pay parity is important.

Competitiveness of each employee's pay can be assessed by Compa-ratio. In this exercise, you'll derive compa-ratio as:

$$\text{Compa-ratio} = \frac{\text{Actual compensation}}{\text{Median compensation}}$$

Median compensation is used by organizations to estimate the typical pay for any role/level. This metric helps the organization to correct the compensation of employees who are way below the median compensation.

Note: Remember, median is also known as the 50th percentile. Exactly 50 percent of people make less than the median and 50 percent make more.

Questo esercizio fa parte del corso

HR Analytics: Predicting Employee Churn in R

Visualizza il corso

Istruzioni dell'esercizio

  • For each level, calculate the median compensation (median_compensation) and compa-ratio (compa_ratio).
  • Print the median compensation for each level.

Esercizio pratico interattivo

Prova a risolvere questo esercizio completando il codice di esempio.

# Add median_compensation and compa_ratio
emp_compa_ratio <- emp_tenure %>%  
  group_by(___) %>%   
  mutate(median_compensation = ___, 
         compa_ratio = ___)

# Look at the median compensation for each level           
emp_compa_ratio %>% 
  ___(level, median_compensation)
Modifica ed esegui il codice