Description Usage Arguments Value
View source: R/add_ep_wp_variables.R
Given a 'nflscrapR' play-by-play data frame, calculate the win probability for a play using the 'nflscrapR' win probability model and include the columns to the input data frame. See here for an explanation of the model methodology: https://arxiv.org/abs/1802.00998. Source code for fitting the model is located here https://github.com/ryurko/nflscrapR-models/blob/master/R/init_models/init_ep_fg_models.R.
1 | add_wp_variables(pbp_data)
|
pbp_data |
Data frame with all of the necessary columns used to estimate the win probability for a play. |
The input data frame with additional columns included for the win probability (wp), win probability added (wpa), and respective win probability for both home and away teams (home_wp, away_wp).
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.