vs_simulate_match | R Documentation |
Simulate a volleyball match using either best-of-5 or best-of-3 scoring
vs_simulate_match(
rates,
process_model = "phase",
serving = NA,
serving5 = NA,
max_sets = 5,
go_to = 25,
go_to5 = 15,
point_margin = 2L,
point_margin5 = 2L,
n = 2000,
simple = TRUE,
method = "theoretical"
)
vs_simulate_match_mc(...)
vs_simulate_match_theor(...)
vs_simulate_match_beach(...)
rates |
list: A two-element list, each element of which is a set of rates as returned by |
process_model |
string: either "sideout" or "phase". See |
serving |
logical: if |
serving5 |
logical: if |
max_sets |
integer: the maximum number of sets to be played (either 3 or 5) |
go_to |
integer: the minimum score that must be reached to end the set (typically 25 for indoor volleyball in sets 1 to 4, 15 in set 5, or 21 in beach volleyball) |
go_to5 |
integer: the minimum score that must be reached to end the tiebreaker set (typically 15 for indoor volleyball) |
point_margin |
integer: the minimum score difference in order to win the set. Only applicable to |
point_margin5 |
integer: the minimum score difference in order to win the tiebreaker set. Only applicable to |
n |
integer: the number of simulations to run. Only applicable to |
simple |
logical: if |
method |
string: the simulation method to use. Either "monte carlo" or "theoretical". Details TBD |
... |
parameters as for |
vs_estimate_rates()
vs_simulate_set()
## Not run:
library(datavolley)
x <- dv_read(dv_example_file())
rates <- vs_estimate_rates(x, target_team = "each")
vs_simulate_set(rates) ## simulate a single set
vs_simulate_match(rates) ## simulate a match
## so given the performances of the two teams during that match, we expect
## that the home team should have won, with 3-0 being the most likely scoreline
## compare to the actual match result
summary(x)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.