sim.bracket | R Documentation |
Simulate the full bracket starting with an empty bracket
sim.bracket(
bracket.empty,
prob.matrix = NULL,
prob.source = c("pop", "kenpom", "538"),
league = c("men", "women"),
year = current.year,
home.teams = NULL,
num.reps = 1
)
bracket.empty |
a length-64 character vector giving the field of 64 teams in the tournament, in order of initial overall seeding |
prob.matrix |
a matrix of probabilities, with rows and columns corresponding to teams, matching the output of bradley.terry(). If NULL, prob.source is used. |
prob.source |
source from which to use round probabilities for simulation — "pop": ESPN's population of picks (default), "kenpom": Ken Pomeroy's predictions (kenpom.com), or "538": predictions form fivethirtyeight.com. Ignored if prob.matrix is specified. |
league |
which league: "men" (default) or "women", for prob.source. Ignored if prob.matrix is specified. |
year |
year of tournament, used for prob.source. Ignored if prob.matrix is specified. |
home.teams |
character vector of names of teams to whom home-team bias is to be applied (must match name column of pred.pop.[league].[year]). Ignored unless prob.source is "pop" (see ?add.home.bias for details). |
num.reps |
number of simulations to perform (default is 1) |
a 63-by-num.reps matrix storing the simulation outcome, each column encoding the outcome for a single simulation in the following order: seeds 1 through 32 after round 1, seeds 1 through 16 after round 2, seeds 1 through 8 after round 3, seeds 1 through 4 after round 4, seeds 1 and 2 after round 5, and finally seed 1 after round 6 (the champion)
sspowers
sim.bracket(bracket.empty = bracket.men.2018, prob.source = "538",
league = "men", year = 2018)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.