randomelo {EloRating} | R Documentation |
calculate Elo ratings from an interaction matrix
Description
calculate Elo ratings from an interaction matrix based on randomly generated sequences
Usage
randomelo(
interactionmatrix,
runs = 2000,
normprob = TRUE,
k = 100,
progressbar = FALSE
)
Arguments
interactionmatrix |
square interaction matrix with winner in rows and
losers in columns, for example the output from
|
runs |
number of randomly generated sequences based on the interactions
in the |
normprob |
logical (by default |
k |
numeric, factor k that determines the maximum change in
ratings. By default |
progressbar |
logical, should progress bars be displayed, by default
|
Value
list of length 2. The first element contains a matrix with the final rating of each individual from each random sequence. IDs are in the columns, each run is represented as one row. The second element of the list contains the original interaction matrix.
Author(s)
Christof Neumann
Examples
data(adv)
elores <- elo.seq(winner = adv$winner, loser = adv$loser, Date = adv$Date)
mat <- creatematrix(elores)
res <- randomelo(mat, 10)
data.frame(ID = colnames(res[[1]]), avg = round(colMeans(res[[1]]), 1))