foot_rank {footBayes}R Documentation

Rank and points predictions

Description

Posterior predictive plots and final rank table for football seasons.

Usage

foot_rank(data, object, team_sel, visualize = c("aggregated", "individual"))

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 stanfit as given by stan_foot function.

team_sel

Selected team(s). By default, all the teams are selected.

visualize

Type of plot, default is "aggregated".

Details

For Bayesian models fitted via stan_foot the final rank tables are 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

Final rank tables and plots with the predicted points for the selected teams as given by the models fitted via the stan_foot function.

Author(s)

Leonardo Egidi legidi@units.it

Examples


## Not run: 
require(tidyverse)
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", iter = 200)
foot_rank(italy_1999_2000, fit)
foot_rank(italy_1999_2000, fit, visualize =  "individual")
 
## End(Not run)


[Package footBayes version 0.2.0 Index]