I selected Type A, Question 3: Does manager tenure or promotion
source (promoted_from_within) appear related to team-level
voluntary turnover? I used the Non-Profit employees and Non-Profit
managers files to examine whether manager tenure and internal promotion
are associated with differences in team-level voluntary turnover.
step1_table
| manager_id | n | voluntary_exits | team_vol_rate |
|---|---|---|---|
| NP_E00001 | 12 | 0 | 0.000 |
| NP_E00002 | 5 | 1 | 0.200 |
| NP_E00003 | 8 | 1 | 0.125 |
| NP_E00004 | 7 | 0 | 0.000 |
| NP_E00005 | 9 | 2 | 0.222 |
| NP_E00006 | 17 | 5 | 0.294 |
| NP_E00007 | 8 | 2 | 0.250 |
| NP_E00008 | 18 | 7 | 0.389 |
| NP_E00009 | 13 | 6 | 0.462 |
| NP_E00010 | 13 | 3 | 0.231 |
| NP_E00011 | 17 | 8 | 0.471 |
| NP_E00012 | 15 | 6 | 0.400 |
| NP_E00013 | 4 | 2 | 0.500 |
| NP_E00014 | 20 | 4 | 0.200 |
| NP_E00015 | 11 | 2 | 0.182 |
| NP_E00016 | 11 | 2 | 0.182 |
| NP_E00017 | 10 | 5 | 0.500 |
| NP_E00018 | 9 | 3 | 0.333 |
| NP_E00019 | 16 | 4 | 0.250 |
| NP_E00020 | 19 | 5 | 0.263 |
| NP_E00021 | 15 | 7 | 0.467 |
| NP_E00022 | 18 | 6 | 0.333 |
| NP_E00023 | 14 | 6 | 0.429 |
| NP_E00024 | 11 | 1 | 0.091 |
| NP_E00025 | 6 | 3 | 0.500 |
| NP_E00026 | 13 | 1 | 0.077 |
| NP_E00027 | 21 | 3 | 0.143 |
| NP_E00028 | 15 | 3 | 0.200 |
| NP_E00029 | 16 | 6 | 0.375 |
| NP_E00030 | 17 | 7 | 0.412 |
| NP_E00031 | 9 | 2 | 0.222 |
| NP_E00032 | 24 | 8 | 0.333 |
| NP_E00033 | 19 | 4 | 0.211 |
| NP_E00034 | 19 | 8 | 0.421 |
| NP_E00035 | 8 | 3 | 0.375 |
| NP_E00036 | 20 | 7 | 0.350 |
| NP_E00037 | 22 | 7 | 0.318 |
| NP_E00038 | 14 | 8 | 0.571 |
| NP_E00594 | 10 | 2 | 0.200 |
| NP_E00595 | 18 | 6 | 0.333 |
| NP_E00604 | 25 | 9 | 0.360 |
| NP_E00618 | 17 | 7 | 0.412 |
| NP_E00629 | 13 | 7 | 0.538 |
| NP_E00630 | 5 | 2 | 0.400 |
| NP_E00631 | 4 | 2 | 0.500 |
| NP_E00632 | 12 | 3 | 0.250 |
Rows before the join:
rows_before
## [1] 632
Rows after the join:
rows_after
## [1] 632
Explain in one sentence why the two counts are the same or different.
The row counts remained the same at 632 before and after the join because the left join preserved all employee records while adding the corresponding manager information.
analysis_table
| promoted_from_within | managers | n | voluntary_exits | team_vol_rate | avg_manager_tenure |
|---|---|---|---|---|---|
| Yes | 28 | 365 | 115 | 0.315 | 4.01 |
| No | 18 | 262 | 81 | 0.309 | 4.77 |
The results showed that teams led by managers promoted from within had a slightly higher voluntary turnover rate of 31.5% compared to teams who were not promoted internally 30.9% Managers promoted from within also had a lower average tenure of 4.01 years, compared to the 4.77 years from managers who were not promoted internally. The small difference of 28 internally and 18 promoted not internally still shows an impact, and the company should consider manager experience and development when evaluating employee retention, while keeping in mind other factors can influence voluntary turnover as well.
A chart is not required. If you want one, make it in your script and
save it as a picture file. The “Optional: a chart” part of the script
shows how. Once you set made_chart to TRUE in
the script, the chunk below displays your saved chart. ggplot2 is not
required for this exercise.
The NEURAL NETWORK section of your script is already written. It asks: can we predict which employees quit, using pay and performance? Here is what it does, in plain words:
Employees in the model, and the share who quit:
nn_overview
| employees | share_who_quit |
|---|---|
| 532 | 0.248 |
Share of held-back employees each approach classified correctly:
nn_accuracy
| employees_tested | guess_most_common_answer | logistic_regression | neural_network |
|---|---|---|---|
| 160 | 0.75 | 0.825 | 0.838 |
How to read that table.
guess_most_common_answer is what you would score with no
model at all, by giving every employee the same answer (whichever is
more common at your company, quit or stay). A model is only useful if it
beats that number.
Answer each in one or two sentences. Replace this text with your answers.
summary(km, times = c(0.5, 1, 2))
# conf.int = FALSE hides the confidence band to keep the picture simple.
plot(km, conf.int = FALSE, lwd = 2,
xlab = "Years since hire",
ylab = "Share of hires still employed",
main = "How long do new hires stay?")
# One curve per salary band. Look for where the curves pull apart.
plot(km_band, conf.int = FALSE, lwd = 2, col = 1:3,
xlab = "Years since hire",
ylab = "Share of hires still employed",
main = "Retention by salary band")
legend("bottomleft", legend = names(km_band$strata), col = 1:3, lwd = 2, bty = "n")
here::here() file.exists(here::here(“mgt4803_r_exercise_script.R”)) file.exists(here::here(“mgt4803_r_exercise_script.R”))
source(here::here(“mgt4803_r_exercise_script.R”)) getwd()