makeWARre24: Compute RE24 before and after each PA.

Description Usage Arguments Value Examples

Description

Compute the Run Expectancy at the beginning and end of every play in a data frame, as well as their difference (RE24).

Usage

1
makeWARre24(data, mod.re = NULL, ...)

Arguments

data

A GameDayPlays object

mod.re

an lm object giving the Run Expectancy Model. If NULL (the default), the run expectancy model will be generated from data

...

currently ignored

Value

a data frame with three columns: startExR, endExR, and delta. The latter is the change in run expectancy.

Examples

1
2
3
4
5
Maymod.re = getModelRunExpectancy(May)
re24 <- makeWARre24(May14)
re24full <- makeWARre24(May14, mod.re = Maymod.re)
sum(re24$delta)
sum(re24full$delta)

beanumber/openWAR documentation built on May 12, 2019, 9:43 a.m.