Description Usage Arguments Value See Also Examples
Simulates a formation against another formation.
1 2 3 4 5 6 7 8 9 10 | unitedSimOne(
home,
away,
r,
penaltyProb = 0.1,
preventGoalGK = 1/14,
preventGoalSW = 1/15,
hardnessMatrix,
overtime = FALSE
)
|
home |
home team (an object of the |
away |
away team (an object of the |
r |
number of replications for the simulation of hardness and penalties, can
be |
penaltyProb |
occurrence probability of a penalty |
preventGoalGK |
factor multiplicied with the strength of the GK for computing the probability of preventing a goal by the goalkeeper |
preventGoalSW |
factor multiplicied with the strength of the SW for computing the probability of preventing a goal by the sweeper |
hardnessMatrix |
|
overtime |
|
Creates an object of the unitedSim
class.
1 2 3 4 5 6 7 8 9 10 | home <- formation(10, NA, c(7,5,3), c(8,8), c(10,10,8))
away <- formation(5, 8, c(8,8), c(10,10), c(10,10,10),
hardness = c(0,0,0,0,1))
set.seed(123)
unitedSimOne(home, away)
# results with overtime
# Note: Only key statistics are adjusted for overtime
unitedSimOne(home, away, overtime = TRUE)
# simulating the game
unitedSimOne(home, away, r = 100)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.