sim.bracket: Simulate the full bracket starting with an empty bracket

Description Usage Arguments Value Author(s) Examples

View source: R/sim.bracket.R

Description

Simulate the full bracket starting with an empty bracket

Usage

1
2
sim.bracket(bracket.empty, prob.matrix = NULL, prob.source = c("pop", "Pom",
  "538"), league = c("men", "women"), year = 2017, num.reps = 1)

Arguments

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), "Pom": 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.

num.reps

number of simulations to perform (default is 1)

Value

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)

Author(s)

sspowers

Examples

1
2
sim.bracket(bracket.empty = bracket.men.2017, prob.source = "538",
  league = "men", year = 2017)

Example output

      [,1]  
 [1,] "222" 
 [2,] "2305"
 [3,] "153" 
 [4,] "2250"
 [5,] "12"  
 [6,] "96"  
 [7,] "97"  
 [8,] "150" 
 [9,] "239" 
[10,] "2483"
[11,] "26"  
[12,] "526" 
[13,] "277" 
[14,] "2086"
[15,] "261" 
[16,] "57"  
[17,] "258" 
[18,] "66"  
[19,] "135" 
[20,] "163" 
[21,] "120" 
[22,] "2306"
[23,] "156" 
[24,] "2567"
[25,] "2579"
[26,] "130" 
[27,] "2724"
[28,] "2608"
[29,] "238" 
[30,] "2550"
[31,] "127" 
[32,] "259" 
[33,] "222" 
[34,] "2305"
[35,] "153" 
[36,] "2250"
[37,] "2608"
[38,] "96"  
[39,] "130" 
[40,] "150" 
[41,] "2567"
[42,] "2483"
[43,] "26"  
[44,] "526" 
[45,] "277" 
[46,] "135" 
[47,] "66"  
[48,] "258" 
[49,] "222" 
[50,] "66"  
[51,] "153" 
[52,] "2250"
[53,] "2608"
[54,] "26"  
[55,] "130" 
[56,] "150" 
[57,] "222" 
[58,] "130" 
[59,] "153" 
[60,] "2608"
[61,] "222" 
[62,] "153" 
[63,] "153" 

mRchmadness documentation built on May 30, 2017, 6:49 a.m.