Functions to compute rating and ranking using Colley method.

rate_colley(cr_data)

rank_colley(cr_data, keep_rating = FALSE, ties = c("average", "first",
  "last", "random", "max", "min"), round_digits = 7)

Arguments

cr_data

Competition results in format ready for as_longcr().

keep_rating

Whether to keep rating column in ranking output.

ties

Value for ties in round_rank().

round_digits

Value for round_digits in round_rank().

Value

rate_colley() returns a tibble with columns player (player identifier) and rating_colley (Colley rating). The mean rating should be 0.5. Bigger value indicates better player performance.

rank_colley() returns a tibble with columns player, rating_colley (if keep_rating = TRUE) and ranking_colley (Colley ranking computed with round_rank()).

Details

This rating method was initially designed for games between two players. There will be an error if in cr_data there is a game not between two players. Convert input competition results manually or with to_pairgames() from comperes package.

It is assumed that score is numeric and higher values are better for the player.

Computation is done based only on the games between players of interest (see Players). Note that it isn't necessary for all players of interest to be present in cr_data but it might be a good idea in order to obtain plausible outcome rating.

The outline of the Colley method is as follows:

  1. Compute Colley matrix: diagonal elements are equal to number of games played by certain player plus 2, off-diagonal are equal to minus number of common games played. This matrix will be the matrix of system of linear equations (SLE).

  2. Compute right-hand side of SLE as 1 + 0.5*("number of player's wins" - "number of player's losses").

  3. Solve the SLE. The solution is the Colley rating.

Players

comperank offers a possibility to handle certain set of players. It is done by having player column (in longcr format) as factor with levels specifying all players of interest. In case of factor the result is returned only for players from its levels. Otherwise - for all present players.

References

Wesley N. Colley (2002) Colley’s Bias Free College Football Ranking Method: The Colley Matrix Explained. Available online at http://www.colleyrankings.com

Examples

rate_colley(ncaa2005)
#> # A tibble: 5 x 2 #> player rating_colley #> <chr> <dbl> #> 1 Duke 0.214 #> 2 Miami 0.786 #> 3 UNC 0.5 #> 4 UVA 0.357 #> 5 VT 0.643
rank_colley(ncaa2005)
#> # A tibble: 5 x 2 #> player ranking_colley #> <chr> <dbl> #> 1 Duke 5 #> 2 Miami 1 #> 3 UNC 3 #> 4 UVA 4 #> 5 VT 2
rank_colley(ncaa2005, keep_rating = TRUE)
#> # A tibble: 5 x 3 #> player rating_colley ranking_colley #> <chr> <dbl> <dbl> #> 1 Duke 0.214 5 #> 2 Miami 0.786 1 #> 3 UNC 0.5 3 #> 4 UVA 0.357 4 #> 5 VT 0.643 2