Skip to content

Releases: davidissamattos/bpcs

bpcs v1.2.2

11 Nov 06:21
Compare
Choose a tag to compare
  • Fixing a bug in the solve_ties option

Release 1.2.1

03 Aug 05:47
Compare
Choose a tag to compare

bpcs 1.2.1

  • Moving to cmdstanr instead of rstan.
    • This will allow us to fix some bugs and tweaks that were not optimal.
    • Now we can have faster installations and let cmdstan compile the models.
    • There will be some additional time to compile the models for the first time but that is only the first time we use it
    • We can now remove the errors from ubsan-clang in CRAN which apparently is a lot of trial and error to solve and not supporting tools from CRAN for identifying that
  • The interface of the bpcs will remain (practically) the same
  • new function to retrieve the posterior distribution of the parameters get_parameters_posterior
  • alias to retrieve the summary data frame of the parameters get_parameters_df
  • Removed dependency on coda
  • Now we can specify the probability mass in the parameters and in summary
  • rstan and shinystan are now optional
  • Fix problems with multiple clusters in the posterior predictive function
  • Ability to add credibility mass and choose HDPI or credible intervals in print and in summary
  • New function check_convergence_diagnostics for HMC diagnostics. This is printed as default in print but not in summary

Release 1.1

05 Feb 09:53
Compare
Choose a tag to compare

bpcs 1.1.0

  • Possibility to add up to 3 intercept random effects (hopefully you will never need more than that)
  • Model for subject predictors (see the example on the paper)
  • Make predictions of submodels with the model_type option (see the example on the paper)
  • Some small bug fixes

In the next release, we will remove support from rstan and move towards cmdstanr

Minor improvements and publication functions

20 Dec 07:25
Compare
Choose a tag to compare
  • removed ties_pred from models that do not have ties and from the stan models.
  • fixed predict for models with ties, so we return a vector y_pred with 0, 1, 2 and not separate as now
  • removed posterior distributions from the get_rank_of_players and get_probabilities. Now we have new functions to obtain the data frame or the posterior distributions separately. The posterior is now returned as matrix
  • Probabilities table is now optional in the summary function
  • New functions to get the probabilities for specific data get_probabilities_newdata_df and get_probabilities_newdata_posterior
  • Publication ready functions for
    • plots: get_parameters_plot function and a thin S3 plot wrapper for the same function. Plots are default to APA.
    • tables: Functions for publication tables: get_parameter_table, get_probabilities_table and get_rank_of_players_table
  • get_hpdi_parameters became get_parameters and the user specify if credible intervals or hpdi
  • Added ties to expand_aggregated_data.
  • We can get now both credible and HPD intervals in get_parameters. n_eff and Rhat are also now possible to add and remove from this df
  • Added functions to save and load bpc models

First official release

10 Dec 14:59
Compare
Choose a tag to compare

Features of the bpcs package

  • Bayesian computation of different variations of the Bradley-Terry
    (including with home advantage, random effects and the generalized
    model).
  • Bayesian computation of different variations of the Davidson model
    to handle ties in the contest (including with home advantage, random
    effects and the generalized model).
  • Accepts a column with the results of the contest or the scores for
    each player.
  • Customize a normal prior distribution for every parameter.
  • Compute HDP interval for every parameter with the
    get_hpdi_parameters function
  • Compute rank of the players with the get_rank_of_players function.
  • Compute all the probability combinations for one player beating the
    other with the get_probabilities function.
  • Convert aggregated tables of results into long format (one contest
    per row) with the expand_aggregated_data.
  • Obtain the posterior distribution for every parameter of the model
    with the get_sample_posterior function.
  • Easy predictions using the predict function.
  • We do not reinforce any table or plotting library! Results are
    returned as data frames for easier plotting and creating tables
  • We reinforce the need to manually specify the model to be used.

Models available

  • Bradley-Terry (bt) (Bradley and Terry 1952)
  • Davidson model (davidson) for handling ties (Davidson 1970)

Options to add to the models:

  • Order effect (-ordereffect). E.g. for home advantage (Davidson and
    Beaver 1977)
  • Generalized models (-generalized). When we have contestant
    specific predictors (Springall 1973)
  • Intercept random effects (-U). For example, to compensate
    clustering or repeated measures (Böckenholt 2001)

E.g.:

  • Simple BT model: bt
  • Davidson model with random effects: davidson-U
  • Generalized BT model with order effect: bt-generalized-ordereffect