simSet: simSet

Description Usage Arguments Details Value

Description

simulate a set between two players, using the probability each will win a point on their serve

Usage

1
2
simSet(pA, pB, playTiebreak = TRUE, players = c("A", "B"), detail = FALSE,
  p2A = NULL, firstServeA = NULL, p2B = NULL, firstServeB = NULL)

Arguments

pA

probability of player A winning point on their first serve

pB

probability of player B winning point on their first serve

playTiebreak

logical, play tiebreak at 6 games all

players

player names, vector of length 2

detail

return detailed data for set, default FALSE

p2A

probability of player A winning point on their second serve

firstServeA

probability of player A getting their first serve in

p2B

probability of player B winning point on their second serve

firstServeB

probability of player B getting their first serve in

Details

minimum input required is the probability that each player will win a point on their serve, however additional parameters include probability of each player winning a point on their second serve, the probability of a players first serve being in, and whether they play a tiebreak

Value

1 (if player A wins), 0 (if player B wins). If the parameter detail is set to TRUE, then the function will returna detailed list about the simulated set, including data about the indvidual games in that set. This list can be converted to a dataframe using simDf. See simSets for simulating many sets between the two players


durtal/servevolleyR documentation built on May 15, 2019, 6:02 p.m.