Description Usage Arguments Value Examples
Glicko2 rating algorithm
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
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:
|
data |
data.frame which contains columns specified in formula, and
optional columns defined by |
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 |
sigma |
(only for glicko2) named vector of initial players ratings
estimates. If not specified then |
lambda |
name of the column in 'data' containing lambda values or one
constant value (eg. |
share |
name of the column in 'data' containing player share in team efforts. It's used to first calculate combined rating of the team and then redistribute ratings update back to players level. Warning - it should be used only if formula is specified with players nested within teams ('player(player|team)'). |
weight |
name of the column in 'data' containing weights values or
one constant (eg. |
init_r |
initial values for |
init_rd |
initial values for |
init_sigma |
initial values for |
kappa |
controls |
tau |
The system constant. Which constrains the change in volatility over
time. Reasonable choices are between 0.3 and 1.2 ( |
A "rating" object is returned:
final_r
named vector containing players ratings.
final_rd
named vector containing players ratings deviations.
final_sigma
named vector containing players ratings volatile.
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.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | # 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
glicko2 <- glicko2_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
glicko2 <- glicko2_run(
data = data,
formula = rank_team | id ~ player(player | team)
)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.