Description Usage Arguments Details Value Examples
Build the Run Expectancy Model
1 2 3 4 5 6 7 8 9 10 | getModelRunExpectancy(data, mod.re = NULL, verbose = TRUE,
drop.incomplete = TRUE, ...)
## Default S3 method:
getModelRunExpectancy(data, mod.re = NULL, verbose = TRUE,
drop.incomplete = TRUE, ...)
## S3 method for class 'GameDayPlays'
getModelRunExpectancy(data, mod.re = NULL,
verbose = TRUE, drop.incomplete = TRUE, ...)
|
data |
a |
mod.re |
an existing Run Expectancy Model |
verbose |
print messages to screen during operation? |
drop.incomplete |
a LOGICAL indicating whether incomplete innings (e.g. walk-off innings) should be excluded |
... |
currently ignored |
This function will build the Run Expectancy Model used in openWAR
.
An lm
object
1 2 3 4 5 6 | data(May)
re.mod <- getModelRunExpectancy(May)
# Display the Run Expectancy Matrix
states = expand.grid(startCode = 0:7, startOuts = 0:2)
matrix(predict(re.mod, newdata=states), ncol=3)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.