colley_rating: Colley method

View source: R/rating_methods.R

colley_ratingR Documentation

Colley method

Description

Rank computation using the Cooley method with ties if required

Usage

colley_rating(n, w, l, t = NULL)

Arguments

n

symmetric matrix of number of times each player faced another, zero diagonal

w

accumulated vector of wins for each player

l

accumulated vector of losses for each player

t

symmetric matrix of ties, with zero diagonal

Value

Vector with ratings

Author(s)

Pedro Guarderas pedro.felipe.guarderas@gmail.com

Examples

d <- 10
n <- matrix( sample( x = 0:5, size = d * d, replace = TRUE ), d, d )
n <- n + t( n )
diag( n ) <- 0
g <- rowSums( n )
# Number of win matches for each team
w <- sapply( 1:d, FUN = function( i ) sample( x = 1:g[i], size = 1, replace = TRUE ) )
# Number of lost matches for ech team
l <- rowSums( n ) - w
r <- colley_rating( n, w, l )

pedroguarderas/mau documentation built on Oct. 30, 2023, 4:20 a.m.