fide {PlayerRatings} | R Documentation |
The Elo Rating System Employed By The FIDE
Description
Implements the Elo rating system for estimating the relative skill level of players in two-player games such as chess, implementing a version similar to that employed by the FIDE.
Usage
fide(x, status = NULL, init = 2200, gamma = 0, kfac = kfide,
history = FALSE, sort = TRUE, ...)
Arguments
x |
A data frame containing four variables: (1) a numeric vector denoting the time period in which the game took place (2) a numeric or character identifier for player one (3) a numeric or character identifier for player two and (4) the result of the game expressed as a number, typically equal to one for a player one win, zero for a player two win and one half for a draw. |
status |
A data frame with the current status of the
system. If not |
init |
The rating at which to initialize a new player not
appearing in |
gamma |
A player one advantage parameter; either a single
value or a numeric vector equal to the number of rows in
|
kfac |
The K factor parameter. Can be a single number or
a vectorized function of three arguments, the first being the
ratings, the second being the number of games played, and the
third being a binary indicator for whether or not a player
has ever achieved a rating above 2400. See |
history |
If |
sort |
If |
... |
Passed to the function |
Details
The Elo rating system is a simple method for evaluating the skill
of players. It has been used since around 1960 and is still
employed in various settings. Although the basic form uses only
the ratings, additional complexity is commonly introduced
by adding a player one advantage parameter and by using different
K factors. A player one advantage parameter has been added to the
original definition in the reference. A player one advantage
parameter is also used for prediction purposes in
predict.rating
.
This implementation uses default arguments that are consistent
with the implementation of FIDE for rating chess players.
It does not employ the initialization used by FIDE. For the
chess data analyzed in the file doc/ChessRatings.pdf, prediction
performance is poor because the default values of the K factors
are too low. This can be altered using the kv
argument
which is passed to the function kfide
.
Value
A list object of class "rating"
with the following
components
ratings |
A data frame of the results at the end of the
final time period. The variables are self explanatory except
for |
history |
A three dimensional array, or |
gamma |
The player one advantage parameter. |
kfac |
The K factor or K factor function. |
type |
The character string |
References
Elo, Arpad (1978) The Rating of Chessplayers, Past and Present. Arco. ISBN 0-668-04721-6.
See Also
Examples
afl <- aflodds[,c(2,3,4,7)]
robj <- fide(afl)
robj
robj <- fide(afl[afl$Week==1,])
for(i in 2:max(afl$Week)) robj <- fide(afl[afl$Week==i,], robj$ratings)
robj