foot_round_robin {footBayes} | R Documentation |
Round-robin for football leagues
Description
Posterior predictive probabilities for a football season in a round-robin format
Usage
foot_round_robin(data, object, team_sel)
Arguments
data |
A data frame, or a matrix containing the following mandatory items: home team, away team, home goals, away goals. |
object |
An object of class |
team_sel |
Selected team(s). By default, all the teams are selected. |
Details
For Bayesian models fitted via stan_foot
the round-robin table is computed according to the
simulation from the posterior predictive distribution of future (out-of-sample) matches.
The dataset should refer to one or more seasons from a given national football league (Premier League, Serie A, La Liga, etc.).
Value
Round-robin plot with the home-win posterior probabilities computed from the ppd of the fitted model via the stan_foot
function.
Author(s)
Leonardo Egidi legidi@units.it
Examples
## Not run:
require(dplyr)
data("italy")
italy_1999_2000<- italy %>%
dplyr::select(Season, home, visitor, hgoal,vgoal) %>%
dplyr::filter(Season == "1999"|Season=="2000")
fit <- stan_foot(italy_1999_2000, "double_pois", predict = 45, iter = 200)
foot_round_robin(italy_1999_2000, fit)
foot_round_robin(italy_1999_2000, fit, c("Parma AC", "AS Roma"))
## End(Not run)