Given a dataset of plays and the necessary variables, this function returns the original dataset with the win probability from the nflscrapR model.
calculate_win_probability(pbp_data, half_seconds_remaining,
game_seconds_remaining, score_differential, quarter, posteam_timeouts_pre,
oppteam_timeouts_pre, ep)
Play-by-play dataset to estimate expected points for.
String denoting the name of the column of the pbp_data containing the number of seconds remaining in the current half.
String denoting the name of the column of the pbp_data containing the number of seconds remaining in the game.
String denoting the name of the column of the pbp_data containing the score differential with respect to the possession team.
String denoting the name of the column of the pbp_data containing the quarter of the play (anything above 4 is considered overtime).
String denoting the name of the column of the pbp_data containing the number of timeouts remaining for the team with possession.
String denoting the name of the column of the pbp_data containing the number of timeouts remaining for the opposing team.
String denoting the name of the column of the pbp_data containing the expected points with respect to the possession team for the play.
The original pbp_data with a column named wp containing the win probability with respect to the team with possession.