Basic usage functions

Basic functions that are used in the R console for model fitting and simple investigations.

bpc()

Bayesian Paired comparison regression models in Stan

summary(<bpc>)

Summary of the model bpc model.

print(<bpc>)

Print method for the bpc object.

predict(<bpc>)

Predict results for new data.

plot(<bpc>)

S3 plot function for the parameter plot of a bpc model This is just a wrapper for the get_parameters_plot function and can be used interchangebly

get_probabilities_df()

Get the empirical win/draw probabilities based on the ability/strength parameters.

get_rank_of_players_df()

Generate a ranking of the ability based on sampling the posterior distribution of the ranks.

Model checking functions

These are a thin wrapper over other packages functions to facilitate the investigation of the convergence of the MCMC.

check_convergence_diagnostics()

Run cmdstan diagnostics for convergence and print the results in the screen Thin wrapper over cmdstanr cmdstan_diagnose() function

launch_shinystan()

Tiny wrapper to launch a shinystan app to investigate the MCMC. It launches a shinystan app automatically in the web browser This function requires having rstan and shinystan installed

get_waic()

Tiny wrapper for the WAIC method from the loo package.

get_loo()

Tiny wrapper for the PSIS-LOO-CV method from the loo package.

Publication-ready functions

Functions used to generate publication-ready plots and tables.

get_rank_of_players_table()

Publication-ready table for the rank table

get_parameters_table()

Publication-ready table for the parameter estimates

get_probabilities_table()

Publication-ready table for the probabilities

get_parameters_plot()

Return a plot for the parameters estimates based on the HPD interval The returned plot is a caterpillar type of plot

Posterior distribution functions

Functions used to investigate the posterior distribution.

get_sample_posterior()

Get the posterior samples for a parameter of the model.

get_rank_of_players_posterior()

Generate a ranking of the ability based on sampling the posterior distribution of the ranks.

get_probabilities_posterior()

Get the posterior of the probabilities

Data Transformation

Functions that provide that transformations.

expand_aggregated_data()

Expand aggregated data Several datasets for the Bradley-Terry Model aggregate the number of wins for each player in a different column. The models we provide are intended to be used in a long format. A single result for each contest. This function expands datasets that have aggregated data into this long format.

Datasets

Description of the built-in datasets.

tennis_agresti

This is the expansion of the tennis data from Agresti (2003) p.449 This data refers to matches for several women tennis players during 1989 and 1990

brasil_soccer_league

This is a dataset with the results matches fromo the first league of the Brazilian soccer championship from 2017-2019. It was reduced and translatedfrom the adaduque/Brasileirao_Dataset repository

optimization_algorithms

Dataset containing an example of the performance of different optimization algorithms against different benchmark functions. This is a reduced version of the dataset presented at the paper: "Statistical Models for the Analysis of Optimization Algorithms with Benchmark Functions.". For details on how the data was collected we refer to the paper.