Skip to content

eaegerber/cmprsk_mlbdraft

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cmprsk_mlbdraft: Assessing Impact of Draft Day Features on MLB Career Outcomes via Competing Risks

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.

Repository Overview

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

Try App

Explore the insights interactively via the deployed Shiny app here:

https://e-gerber.shinyapps.io/DraftSurvival/


Background & Purpose

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:

  1. Making it to MLB, versus
  2. 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.


Getting Started

  1. Clone the repo
  2. Install required packages, e.g.:
    install.packages(c("survival", "cmprsk", "riskRegression",
                       "prodlim", "aftgee", "ranger",
                       "contsurvplot", "CFC"))
  3. Replicate most recent analysis with R/analysis_08_24.R
  4. Launch the Shiny app:
    shiny::runApp("DraftSurvival/")

Contact

Eric Gerber, PhD Northeastern University email: e.gerber@northeastern.edu github: eaegerber

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published