/Senior-Thesis

Files used for Senior Thesis (Yale University, Spring 2019)

Primary LanguageR

Senior-Thesis

"An Examination of Timeout Value, Strategy, and Momentum in NCAA Division 1 Men’s Basketball"

In Partial Fulfillment of the Requirements for the Degree Bachelor of Science in Applied Mathematics

Yale University

Luke Benz

April 2019

Advisor: Xiaofei Wang


scrape.R: Pulls data using ncaahoopR package and stores it in pbp_data/ and test_pbp_data/. Due to GitHub only allowing 1000 files per directory, those directories have been broken down into smaller subdirectories containing 1000 files each.

clean.R: Cleans data. Due to GitHub size restrictions, the cleaned .rda objects used in subsequent analyses are unable to be uploaded. They can be recovered by running this script.

fit_model.R: Fits various win probability models discussed in Chapter 3.

model_cv.R: Predicts win probability models discussed in Chapter 3 on data in test_pbp_data/. Stores results in test_cv_results/.

eval.R: Evaluates various win probability models discussed in Chapter 3. Stores results in test_cv_results/.

score_runs.R: Computes net score differentials in intervals before and after each time stamp.

pts_above_exp.R: Framework for building mixed-effects models to evaluate points above expectation after timeouts.

imputation_evaluation.R: Evaluates lines imputed by ncaahoopR by comparing them to Vegas pointspreads. Imputed lines are available in NCAA_Hoops_Results_2017_Final.csv (2016-17), training.csv(2017-18), and 2019_Final.csv (2018-19). Results are stored in line_imputation.csv.

intro_graphics.R: Code used for figures and tables in the introduction.

chap_2_graphics.R: Code used for figures and tables in Chapter 2.

chap_3_graphics.R: Code used for figures and tables in Chapter 3.

chap_4_graphics.R: Code used for figures and tables in Chapter 4.