This project examines how MLB draft‑day factors influence the time it takes for draftees to either make it to MLB or retire beforehand, using competing‑risks survival modeling via the cmprsk R package.
cmprsk_mlbdraft/
├── conferences/ # supplemental files presented at JSM 2022, NESSIS 2023, JSM 2024
├── data cleaning/ # Raw and processed datasets + .R files
├── R/
│ ├── analysis_08_24.R # most recent analysis
│ ├── cleaned_df.csv # data used for most recent analysis
├── DraftSurvival/ # R Shiny interface code for interactive exploration
│ ├── app.R # Launches the UI and server
└── README.md # This overview
Explore the insights interactively via the deployed Shiny app here:
https://e-gerber.shinyapps.io/DraftSurvival/
This project applies competing risks analysis to evaluate how variables like draft position, signing bonus, and player role (e.g. LHP, RHP, batter) affect the chances of:
- Making it to MLB, versus
- Retiring before reaching MLB
The goal is to quantify time-to-event probabilities and provide a user-facing app for exploratory analysis—helpful for players, agents, and analysts.
- Clone the repo
- Install required packages, e.g.:
install.packages(c("survival", "cmprsk", "riskRegression", "prodlim", "aftgee", "ranger", "contsurvplot", "CFC"))
- Replicate most recent analysis with
R/analysis_08_24.R - Launch the Shiny app:
shiny::runApp("DraftSurvival/")
Eric Gerber, PhD Northeastern University email: e.gerber@northeastern.edu github: eaegerber