1. My question

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.

2. My analysis

Step 1: Summary of one file

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

Step 2: Join check

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.

Step 3: Print your table

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

3. What this shows

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.

4. Optional chart

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.

5. A small neural network

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:

  1. Builds one row per employee, with whether they quit and four things we know about them.
  2. Puts those four inputs on the same scale.
  3. Holds back 30% of employees to test on. The models never see them during fitting.
  4. Fits a neural network with two hidden nodes, the same shape as the picture from class.
  5. Fits a logistic regression on the same data, so you have something to compare against.
  6. Checks how many of the held-back employees each model classified correctly.

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.

Your answers

Answer each in one or two sentences. Replace this text with your answers.

  1. The baseline approach correctly classified 75% of employees, logistic regression correctly classfied 82.5%, and the neural network correctly shows 83.8% of the 160 employees tested.
  2. The neural network performed slightly better than the logistic regression, with a 1.3 percentage point difference. Both models outperformed the 75% baseline although this still does not establish whether the improvements are that significant. the simple guess by enough to matter?
  3. I would prefer the logistic regression approach when explaining a prediction to a client because it is generally easier to interpret and explain how the included employee characteristics relate to turnover. The neural network did perform slightly higher, but this approach is more difficult to explain.
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()