-
Notifications
You must be signed in to change notification settings - Fork 35
/
Copy pathgetModelRunExpectancy.Rd
47 lines (39 loc) · 1.25 KB
/
getModelRunExpectancy.Rd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/getModels.R
\name{getModelRunExpectancy}
\alias{getModelRunExpectancy}
\alias{getModelRunExpectancy.default}
\alias{getModelRunExpectancy.GameDayPlays}
\title{getModelRunExpectancy}
\usage{
getModelRunExpectancy(data, mod.re = NULL, verbose = TRUE,
drop.incomplete = TRUE, ...)
\method{getModelRunExpectancy}{default}(data, mod.re = NULL, verbose = TRUE,
drop.incomplete = TRUE, ...)
\method{getModelRunExpectancy}{GameDayPlays}(data, mod.re = NULL,
verbose = TRUE, drop.incomplete = TRUE, ...)
}
\arguments{
\item{data}{a \code{\link{GameDayPlays}} dataset}
\item{mod.re}{an existing Run Expectancy Model}
\item{verbose}{print messages to screen during operation?}
\item{drop.incomplete}{a LOGICAL indicating whether incomplete innings (e.g. walk-off innings)
should be excluded}
\item{...}{currently ignored}
}
\value{
An \code{\link{lm}} object
}
\description{
Build the Run Expectancy Model
}
\details{
This function will build the Run Expectancy Model used in \code{\link{openWAR}}.
}
\examples{
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)
}