glicko: The Glicko Rating System

Description Usage Arguments Details Value References See Also Examples

Description

Implements the Glicko rating system for estimating the relative skill level of players in two-player games such as chess. It extends the Elo method by including a deviation parameter for each player, representing uncertainty on the rating.

Usage

1
2
glicko(x, status = NULL, init = c(2200,300), gamma = 0, cval = 15, 
    history = FALSE, sort = TRUE, rdmax = 350, ...)

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 NULL, this needs to be a data frame in the form of the ratings component of the returned list, containing variables named Player, Rating, Deviation, and optionally Games, Win, Draw, Loss and Lag, which are set to zero if not given.

init

The rating vector at which to initialize a new player not appearing in status. Must be a vector of length two giving the initial rating and initial deviation respectively. If different initializations for different players are required, this can be done using status. The initial deviation cannot be greater than rdmax.

gamma

A player one advantage parameter; either a single value or a numeric vector equal to the number of rows in x. Positive values favour player one, while negative values favour player two. This could represent the advantage of playing at home, or the advantage of playing white for chess. Note that this is not passed to predict.rating, which has its own gamma parameter.

cval

The c parameter, which controls the increase in the player deviations across time. Must be a single non-negative number.

history

If TRUE returns the entire history for each period in the component history of the returned list.

sort

If TRUE sort the results by rating (highest to lowest). If FALSE sort the results by player.

rdmax

The maximum value allowed for the rating deviation.

...

Not used.

Details

The Glicko rating system is a method for evaluating the skill of players. It is more complex than Elo but typically yields better predictions. Default values are roughly optimized for the chess data analyzed in the file doc/ChessRatings.pdf, using the binomial deviance criterion. 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. In this implementation, rating deviances increase at the beginning of the updating period, and decrease at the end. This is slightly different from the Glicko-2 implementation, where deviance increases for active players may occur at the end of the previous period. In both implementations there will be an initial increase for existing but previously inactive players.

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 Lag, which represents the number of time periods since the player last played a game. This is equal to zero for players who played in the latest time period, and is also zero for players who have not yet played any games.

history

A three dimensional array, or NULL if history is FALSE. The row dimension is the players, the column dimension is the time periods. The third dimension gives different parameters.

gamma

The player one advantage parameter.

cval

The c parameter.

type

The character string "Glicko".

References

Glickman, M.E. (1999) Parameter estimation in large dynamic paired comparison experiments. J. R. Stat. Soc. Ser. C: Applied Statistics, 48(3), 377-394.

See Also

elo, glicko2, steph

Examples

1
2
3
4
5
6
7
afl <- aflodds[,c(2,3,4,7)]
robj <- glicko(afl)
robj

robj <- glicko(afl[afl$Week==1,])
for(i in 2:max(afl$Week)) robj <- glicko(afl[afl$Week==i,], robj$ratings)
robj

Example output

Glicko Ratings For 18 Players Playing 675 Games

                      Player Rating Deviation Games Win Draw Loss Lag
1        Collingwood Magpies   2534     88.86    88  68    2   18   0
2               Geelong Cats   2415     87.76    87  68    0   19   0
3             Hawthorn Hawks   2356     81.09    82  48    1   33   1
4          West Coast Eagles   2315     80.74    81  39    0   42   0
5               Sydney Swans   2302     80.19    82  44    1   37   0
6            St Kilda Saints   2241     80.89    86  57    3   26   1
7           Essendon Bombers   2227     82.18    80  37    2   41   0
8             Adelaide Crows   2225     81.79    80  40    0   40   0
9              Carlton Blues   2213     80.02    82  45    1   36   1
10 North Melbourne Kangaroos   2156     82.52    78  34    1   43   0
11         Fremantle Dockers   2146     81.10    80  35    0   45   0
12          Western Bulldogs   2140     81.68    84  45    0   39   0
13           Richmond Tigers   2135     82.56    78  25    2   51   1
14            Brisbane Lions   2049     85.00    80  30    1   49   0
15          Melbourne Demons   2001     86.25    78  22    2   54   0
16       Port Adelaide Power   2001     83.84    78  26    0   52   1
17    Greater Western Sydney   1822    120.85    12   1    0   11   0
18           Gold Coast Suns   1769     95.44    34   3    0   31   1


Glicko Ratings For 18 Players Playing 675 Games

                      Player Rating Deviation Games Win Draw Loss Lag
1        Collingwood Magpies   2534     88.86    88  68    2   18   0
2               Geelong Cats   2415     87.76    87  68    0   19   0
3             Hawthorn Hawks   2356     81.09    82  48    1   33   1
4          West Coast Eagles   2315     80.74    81  39    0   42   0
5               Sydney Swans   2302     80.19    82  44    1   37   0
6            St Kilda Saints   2241     80.89    86  57    3   26   1
7           Essendon Bombers   2227     82.18    80  37    2   41   0
8             Adelaide Crows   2225     81.79    80  40    0   40   0
9              Carlton Blues   2213     80.02    82  45    1   36   1
10 North Melbourne Kangaroos   2156     82.52    78  34    1   43   0
11         Fremantle Dockers   2146     81.10    80  35    0   45   0
12          Western Bulldogs   2140     81.68    84  45    0   39   0
13           Richmond Tigers   2135     82.56    78  25    2   51   1
14            Brisbane Lions   2049     85.00    80  30    1   49   0
15          Melbourne Demons   2001     86.25    78  22    2   54   0
16       Port Adelaide Power   2001     83.84    78  26    0   52   1
17    Greater Western Sydney   1822    120.85    12   1    0   11   0
18           Gold Coast Suns   1769     95.44    34   3    0   31   1

PlayerRatings documentation built on March 1, 2020, 5:07 p.m.