-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathcreate_wpa.Rd
49 lines (47 loc) · 1.21 KB
/
create_wpa.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
48
49
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/create_wpa_naive.R
\name{create_wpa}
\alias{create_wpa}
\alias{create_wpa_naive}
\alias{wpa_calcs_naive}
\title{\strong{Create WPA}}
\usage{
create_wpa_naive(df, wp_model)
wpa_calcs_naive(df)
}
\arguments{
\item{df}{(\emph{data.frame} required): Clean Play-by-Play data.frame with Expected Points Added (EPA) calculations}
\item{wp_model}{(\emph{model} default cfbfastR:wp_model): Win Probability (WP) Model}
}
\value{
The original \code{df} with the following columns appended to it:
\describe{
\item{wp_before}{.}
\item{def_wp_before}{.}
\item{home_wp_before}{.}
\item{away_wp_before}{.}
\item{lead_wp_before}{.}
\item{lead_wp_before2}{.}
\item{wpa_base}{.}
\item{wpa_base_nxt}{.}
\item{wpa_base_ind}{.}
\item{wpa_base_nxt_ind}{.}
\item{wpa_change}{.}
\item{wpa_change_nxt}{.}
\item{wpa_change_ind}{.}
\item{wpa_change_nxt_ind}{.}
\item{wpa}{.}
\item{wp_after}{.}
\item{def_wp_after}{.}
\item{home_wp_after}{.}
\item{away_wp_after}{.}
}
}
\description{
Add Win Probability Added (WPA) calculations to Play-by-Play DataFrame
This is only for D1 football
}
\details{
Requires the following columns to be present in the input data frame.
}
\keyword{internal}