class: center, left

Data Description

Data cleaning

.pull-left[ ## Missing values
x
Date of Termination 198
Employee Name 0
Employee Number 0
State 0
Zip 0
DOB 0
Age 0
Sex 0
MaritalDesc 0
CitizenDesc 0
Hispanic/Latino 0
RaceDesc 0
Date of Hire 0
Reason For Term 0
Employment Status 0
Department 0
Position 0
Pay Rate 0
Manager Name 0
Employee Source 0
Performance Score 0

] .pull-right[ ## Text issues * male -> Male * Software engineering: extra space] —

Age

Gender

.pull-left[ ]

.pull-right[

core %>% 
  group_by(Sex) %>% 
  summarise(wage = mean(`Pay Rate`)) %>% 
  knitr::kable(format = 'html')
Sex wage
Female 29.11678
Male 32.90528

]

Group by sex, race

.pull-left[
Sex RaceDesc av.wage av.age
Female Asian 26.85550 39.80000
Female Black or African American 34.38367 39.96667
Female White 28.65182 38.20000
Male American Indian or Alaska Native 36.00000 38.50000
Male Hispanic 47.33333 36.00000
Male Two or more races 40.46571 42.42857

]

.pull-right[ * Females and African-Americans have higher pay rate * Males and Hispanics have higher pay rate] —

Department

.pull-left[ ]

.pull-right[

core %>% 
  group_by(Department) %>% 
  summarise(wage = mean(`Pay Rate`)) %>% 
  knitr::kable(format = 'html')
Department wage
Admin Offices 31.89600
Executive Office 80.00000
IT/IS 44.79220
Production 23.08630
Sales 55.52419
Software Engineering 48.66500

]

Group by department, position

.pull-left[
Department Position wage
Admin Offices Shared Services Manager 55.00000
Admin Offices Sr. Accountant 34.95000
Executive Office President & CEO 80.00000
IT/IS CIO 65.00000
IT/IS IT Director 65.00000
Production Director of Operations 60.00000
Production Production Manager 49.67857
Sales Director of Sales 60.00000
Sales Sales Manager 56.75000
Software Engineering Software Engineer 51.07222
Software Engineering Software Engineering Manager 27.00000

] .pull-right[ Top-earning persons for each department: - Admin Offices: Shared Services Manager - Executive Office: President & CEO - IT/IS: CIO, IT Director - Production: Director of Operations - Sales: Director of Sales - Software Engineering: Software Engineer] —

Recruitment tools

.pull-left[ * Sales seems to rely heavily on PPC recruitment - but perhaps recruits are keen to show that they are familiar with marketing tools * Production has the largest proportion in practically every employee source - but note that Production is also the largest department.

] .pull-right[ ]

Is there a statistically significant difference in the average pay of males and females?

  • Yes. The difference in means is 3.8 and is significant at the 5% level.
lmtest::coeftest(lm(`Pay Rate`~factor(Sex), data = core))
## 
## t test of coefficients:
## 
##                 Estimate Std. Error t value Pr(>|t|)    
## (Intercept)      29.1168     1.1467 25.3925  < 2e-16 ***
## factor(Sex)Male   3.7885     1.7653  2.1461  0.03267 *  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Is there a difference in the distribution of pay between males and females?

  • Doesn’t seem to be much of a difference in the distribution for junior positions.
  • Almost all execs are females, but there’s a concentration of females among junior-level managers.

class: center, middle

Time to termination within Production

Looks like people who leave Production tend to leave very soon!

Is it the pay rate?

Most of production consists of junior positions. — # Thanks!

Slides created via the R package xaringan.

The chakra comes from remark.js, knitr, and R Markdown.