Description Usage Arguments Value Examples
Simulate NFL Season Pipeline
1 | simulate_season_statistics(pbp_df, n_sims, sim_pipeline)
|
pbp_df |
Play-by-play data frame. |
n_sims |
Number of simulations. |
sim_pipeline |
Pipeline function to apply to each simulation. |
List of results for each simulation.
1 2 3 4 5 6 7 8 9 10 11 | # Create the pipeline:
generate_war_results <- . %>%
resample_season() %>%
prepare_model_data() %>%
add_position_tables() %>%
join_position_statistics() %>%
find_positional_replacement_level(league_replacement_functions) %>%
estimate_player_value_added(wp_model_formula_list, "none") %>%
calculate_above_replacement() %>%
convert_prob_to_wins()
sim_results <- bootstrap_results(get_pbp_data(2017), 1000, generate_war_results)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.