A flexible framework for calculating Elo ratings and resulting rankings of any two-team-per-matchup system (chess, sports leagues, 'Go', etc.). This implementation is capable of evaluating a variety of matchups, Elo rating updates, and win probabilities, all based on the basic Elo rating system. It also includes methods to benchmark performance, including logistic regression and Markov chain models.
The elo
package includes functions to address all kinds of Elo calculations.
library(elo)
Please see the vignette for examples. Note that v1.0.0 is very much not backwards-compatible.
Most functions begin with the prefix "elo.", for easy autocompletion.
Vectors or scalars of Elo scores are denoted elo.A
or elo.B
.
Vectors or scalars of wins by team A are denoted by wins.A
.
Vectors or scalars of win probabilities are denoted by p.A
.
Vectors of team names are denoted team.A
or team.B
.
Widened the version dependency to R 3.3.0.
Allowed players()
matrices in elo.run()
to find Elos of individual players playing at the same time.
Added elo.glm()
, a simple function to run logistic regressions on Elo setups.
Fixed a bug in the favored()
function (used in summary.elo.run()
). (#29)
Exported and revamped the class structure of the specials allowed in formulas. (#30)
Allowed access to elo.model.frame()
even when the package isn't loaded. (#34)
Allowed regression to different values for each team. (#35)
Fixed a bug with initial Elos and deep copying in C++. (#25)
Added an argument to regress()
allowing users to stop regressing teams which have stopped playing. (#26)
This version is not backwards compatible!
Changed the signatures of elo.calc()
and elo.update()
to match formula interface.
Changed elo.calc()
, elo.update()
, and elo.prob()
to S3 generics, and implemented
formula methods. The default methods now include options to adjust Elos. (#3)
elo.run()
:
elo.run()
no longer accepts numeric values for team.A
.
elo.run()
now accepts special functions group()
and regress()
. If the latter is used,
the class of the returned object becomes "elo.run.regressed"
. (#11, #12, #19, #22)
The $elos
component of "elo.run"
objects has been completely reworked, and now uses 1-based indexing.
Because of this, the print.elo.run()
method also had to be fixed. (#16)
Renamed last()
to final.elos()
(#9).
Changed tournament
dataset.
The elo
package now imports pROC::auc()
.
elo.prob()
now accepts vectors of team names (like elo.run()
) as input. (#6)
Documentation and the vignette have been updated.
Implemented elo.model.frame()
. The output is a data.frame
with appropriately named columns.
Implemented predict.elo.run()
and predict.elo.run.regressed()
. (#2, #19)
Added is.score()
to test for "score-ness".
Implemented summary.elo.run()
, along with helpers to calculate AUC and MSE (auc()
and mse()
). (#15)
Made the title more succinct.
Elaborated the description of the package.
Tweak the internal "elo.run"
object.
Tweaked the README and vignette.
Submit first version of elo
to CRAN.
Issues and code can be found on GitHub: https://github.com/eheinzen/elo/