Description Usage Arguments Details
Create EPA Adds Expected Points calculations to Play-by-Play data.frame
1 2 3 4 5 | create_epa(
play_df,
ep_model = cfbscrapR:::ep_model,
fg_model = cfbscrapR:::fg_model
)
|
ep_model |
(model default cfbscrapR:::ep_model): Expected Points (EP) Model |
fg_model |
(model default cfbscrapR:::fg_model): Field Goal (FG) Model |
clean_pbp_dat |
(data.frame required): Clean PBP as input from |
Code Description
pred_df
Use select before play model variables -> Make predictions.
epa_fg_probs
Update expected points predictions from before variables with FG make/miss probability weighted adjustment.
pred_df_after
Use select after play model variables -> Make predictions .
join_ep
Join 'ep_before' calcs 'pred_df' with ep_after calcs 'pred_df_after' on c("game_id","drive_id","new_id").
kickoffs
Calculate ep_before for kickoffs as if the pre-play assumption is a touchback.
wpa_prep
Prep variables for WPA.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.