Simulate: Simulate season

Description Usage Arguments Value Functions

Description

Simulates an entire season from a list of teams and their schedule

Usage

1
2
3
4
5
process_season(teams, schedule, weights = list(c(60, 20, 20)),
  simulation_run = 0)

simulate_league(teams, schedule, weights = list(c(60, 20, 20)),
  num_sims = 10)

Arguments

teams

Data frame of with team_name, race, TV_displayed, TV_extra, wins, losses, draws.

schedule

Data frame containing the league schedule. Must contain round, home_team, andaway_team

weights

List containing a vector per round of three weights for combining probabilities from CCL data and a team's own record. Provided to the calc_game_probs function. If a list with a single vector is provided, it expands it up to the length of the season, i.e. it is a shortcut for providing constant weights for all rounds.

simulation_run

Number of this simulation run. Used to print logging info to console so monitor simulation progress when performed in bulk

num_sims

Total number of simulations to run. Defaults to 10 for a quick run to check that everything is working. Recommend changing it to 1000 or more for real predictions

Value

Data frame containing the predicted results of the season.

Functions


nufflytics/nufflytics documentation built on Oct. 10, 2020, 5:27 p.m.