Description Usage Arguments Value Examples
View source: R/generate_preseason_mlm.r
This function generates preseason projections using mulilevel models to estimate the contribution of each team's offense and defense provides to their Expected Points Added per Play.
1 | generate_preseason_mlm(run_plays, pass_plays)
|
run_plays |
the cleaned run plays after the |
pass_plays |
the cleaned pass plays after the |
a data frame containing the estimated team values at the end of each year.
1 2 3 4 5 6 7 8 9 10 11 | years <- 2013:2014
plays <- readin("play", years)
teams <- readin("team", years)
runs <- readin("rush", years)
pass <- readin("pass", years)
games <- readin("game", years)
conf <- readin("conference", years)
epa_model <- expected_points_build(plays[plays$Year != 2014, ], drives[drives$Year != 2014, ])
fixed_games <- fix_games(games)
model_plays <- combine_run_pass(runs, pass, fixed_games) %>% remove_garbage %>% fix_fcs(teams, conf) %>% add_epa(epa_model)
preseason_vals <- generate_preseason_mlm(model_plays[[1]], model_plays[[2]])
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.