win_probability: Win probability function to add win probability columns for...

Description Usage Arguments Value

View source: R/ExpectedPointAndWinProbability.R

Description

This function takes in the output of the game level play by play function and returns the same dataframe with six new columns representing the win probability for the home and away team pre and post snap and win probability added. The model used to calculate win probability is a generalized additive model using the expected score differential, time remaining in game, also accounting for the timeouts remaining for both teams. Overtime win probability is calculated separately using the scoring event probabilities.

Usage

1
win_probability(dataset)

Arguments

dataset

(data.frame object) A data.frame as exported from the game_play_by_play function

Value

The input dataframe with the addition of six win probability columns giving the win probability for the possession team, the WPA for each play, the pre and post win probability for both the home and away teams.


maksimhorowitz/nflscrapR documentation built on April 3, 2020, 7:40 p.m.