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_dfUse select before play model variables -> Make predictions.
epa_fg_probsUpdate expected points predictions from before variables with FG make/miss probability weighted adjustment.
pred_df_afterUse select after play model variables -> Make predictions .
join_epJoin 'ep_before' calcs 'pred_df' with ep_after calcs 'pred_df_after' on c("game_id","drive_id","new_id").
kickoffsCalculate ep_before for kickoffs as if the pre-play assumption is a touchback.
wpa_prepPrep variables for WPA.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.