Skip to contents

Build columns from the expected dropback model. The model gives the probability of a dropback (a pass, sack, or scramble) from the game situation only: down, distance, field position, score, time remaining, timeouts, and the era of the season (for league-wide trends). It doesn't know anything about the teams. Must be run on a dataframe that has already had clean_pbp() run on it. Note that the functions build_nflfastR_pbp() and the database function update_pbp_db() already include this function.

Usage

add_xpass(pbp, ...)

Arguments

pbp

is a Data frame of play-by-play data scraped using fast_scraper().

...

Additional arguments passed to a message function (for internal use).

Value

The input Data Frame of the parameter pbp with the following columns added:

xpass

Probability of dropback scaled from 0 to 1.

pass_oe

Dropback percent over expected on a given play scaled from 0 to 100.