linear: Linear MOV Elo Ratings

Description Usage Arguments Value Details Examples

Description

This function calculates MOV Elo ratings using a linear model that uses information only from the MOV.

Usage

1
2
linear(winners, losers, margin, k.margin, scale.margin, data,
  default = 1500)

Arguments

winners.

Character vector or formula specifying the winners of each result

losers.

Character vector or formula specifying the losers of each result

margin.

Numeric vector vector or formula specifying the margin of victory, given as winner score - loser score

k.margin.

Numeric value of the learning rate to be applied to the MOV

scale.margin.

Numeric scaling factor applied in the expectation step for the MOV

data.

Data frame containing winner, loser, and margin variables if using a data/formula specification.

default.

Numeric value of the initial rating to assign to new competitors

Value

A data frame with Elo ratings before and after each event result.

Details

Datasets should be ordered from first game result to last. Competitors must be uniquely and consistently identified in the winner and loser vectors. Missing values in the MOV variable will be omitted and will throw a warning.

The E-step for the linear model involves a proportional model for the MOV in terms of the difference in player ratings. The expected margin for player i against j is:

\hat{MOV} = \frac{R_i - R_j}{σ_{margin}}

. A reasonable choice for σ_{margin} is 10 to 30 times the standard deviation of the MOV variable. The U-step for the linear model involves updates based on the residual for the MOV only. In terms of the ith player,

R_{i+1} = R_i + K_{margin} (MOV_{ij} - \hat{MOV}_{ij})

. The unknown parameter in the update step is the constant learning rateK_{margin}. A reasonable choice for K_{margin} is the standard deviation of the MOV variable.

Examples

1
2
# Grand Slam MOV Elo Rating
ratings <- linear(~ winner, ~loser, ~ game_margin, data = atp_games, k.margin = 3,  scale.margin = 75)

GIGTennis/elomov documentation built on June 15, 2019, 12:01 a.m.