Reproducing the results from A Bayesian analysis of the time through the order penalty in baseball (TTO
):
- download
retro_final_PA_1990-2020d.csv
(which was compiled inTTO_/data_wrangling
), andTTO_dataset_410.csv
andTTO_dataset_510.csv
(which were compiled inTTO_/data/create_design_matrix4_10.R
andTTO_/data/create_design_matrix5_10.R
), fromhttps://upenn.app.box.com/v/retrosheet-pa-1990-2000
, and store these datasets inTTO_/data
- run the Bayesian model (the
Stan
fileTTO_/model_positive_slope_prior/tto9_PF_BL_linePosSlope.stan
) for multiple years on a cluster via the array jobTTO_/model_positive_slope_prior/run_obs_fitModel_obs_AJ.sh
, which runsTTO_/model_positive_slope_prior/obs_fitModel.R
- then, run
TTO_/model_positive_slope_prior/results_obs.R
andTTO_/model_positive_slope_prior/results_obs2.R
to obtain the plots and results from the fitted models - same process but in the folder
TTO_/model_pitcher_varying_decay
to use the model with pitcher-varying slopes - same process but in the folder
TTO_/model_indicators
to use the indicator model (indicator at each batter sequence number 1,...,27) - simulation study in
TTO_/model_positive_slope_prior/sims