This app uses data from the Joseph Adler data set. It comprises data from 2000 - 2008 for every major league baseball team, applies a linear model which predicts the number of runs scored by a team, and provide the prediction confidence interval based on some chosen variables.
A demo for the app can be found at: https://marcelotibau.shinyapps.io/baseball-prediction/.
Source code for ui.R and server.R files are available on the GitHub repo: https://github.com/marcelo-tibau/baseball-prediction
The inputs comprises of the following variables: Singles; Doubles; Triples;Home Runs; Walks; Hit by Pitch; Sacrifice Flies; Stolen Bases; and Caught Stealing.
The adjustment will impact on the number of runs scored and the resulting confidence interval.