glicko_run {sport} | R Documentation |
Glicko rating algorithm
Description
Glicko rating algorithm
Usage
glicko_run(
data,
formula,
r = numeric(0),
rd = numeric(0),
init_r = 1500,
init_rd = 350,
lambda = numeric(0),
share = numeric(0),
weight = numeric(0),
kappa = 0.5
)
Arguments
data |
data.frame which contains columns specified in formula, and
optional columns defined by |
formula |
formula which specifies the model. RHS Allows only player
rating parameter and it should be specified in following manner:
Users can also specify formula in in different way:
|
r |
named vector of initial players ratings estimates. If not specified
then |
rd |
rd named vector of initial rating deviation estimates. If not specified
then |
init_r |
initial values for |
init_rd |
initial values for |
lambda |
name of the column in |
share |
name of the column in |
weight |
name of the column in |
kappa |
controls |
Value
A "rating" object is returned:
-
final_r
named vector containing players ratings. -
final_rd
named vector containing players ratings deviations. -
r
data.frame with evolution of the ratings and ratings deviations estimated at each event. -
pairs
pairwise combinations of players in analysed events with prior probability and result of a challenge. -
class
of the object. -
method
type of algorithm used. -
settings
arguments specified in function call.
Examples
# the simplest example
data <- data.frame(
id = c(1, 1, 1, 1),
team = c("A", "A", "B", "B"),
player = c("a", "b", "c", "d"),
rank_team = c(1, 1, 2, 2),
rank_player = c(3, 4, 1, 2)
)
# Example from Glickman
glicko <- glicko_run(
data = data,
formula = rank_player | id ~ player(player),
r = setNames(c(1500.0, 1400.0, 1550.0, 1700.0), c("a", "b", "c", "d")),
rd = setNames(c(200.0, 30.0, 100.0, 300.0), c("a", "b", "c", "d"))
)
# nested matchup
glicko <- glicko_run(
data = data,
formula = rank_team | id ~ player(player | team)
)