add_xpass: Add expected pass columns

View source: R/helper_add_xpass.R

add_xpassR Documentation

Add expected pass columns

Description

Build columns from the expected dropback model. Will return NA on data prior to 2006 since that was before NFL started marking scrambles. 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_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.


nflfastR documentation built on Oct. 20, 2023, 5:14 p.m.