elo.prob {elo} | R Documentation |
Calculate the probability that team A beats team B. This is vectorized.
elo.prob(elo.A, ...) ## Default S3 method: elo.prob(elo.A, elo.B, ..., elos = NULL, adjust.A = 0, adjust.B = 0) ## S3 method for class 'formula' elo.prob(formula, data, na.action, subset, ..., elos = NULL)
elo.A, elo.B |
Numeric vectors of elo scores, or else vectors of teams. |
... |
Other arguments (not in use at this time). |
elos |
An optional named vector containing Elo ratings for all teams in |
adjust.A |
Numeric vectors to adjust |
adjust.B |
Numeric vectors to adjust |
formula |
A formula. See the help page for formulas for details. |
data |
A |
na.action |
A function which indicates what should happen when the data contain NAs. |
subset |
An optional vector specifying a subset of observations. |
Note that formula
can be missing the wins.A
component. If
present, it's ignored by elo.model.frame
.
A vector of Elo probabilities.
elo.update
, elo.calc
,
elo.model.frame
elo.prob(1500, 1500) elo.prob(c(1500, 1500), c(1500, 1600)) dat <- data.frame(wins.A = c(1, 0), elo.A = c(1500, 1500), elo.B = c(1500, 1600), k = c(20, 20)) elo.prob(~ elo.A + elo.B, data = dat) ## Also works to include the wins and k: elo.prob(wins.A ~ elo.A + elo.B + k(k), data = dat) ## Also allows teams elo.prob(c("A", "B"), c("C", "C"), elos = c(A = 1500, B = 1600, C = 1500))