Calculate post-update Elo values. This is vectorized.
elo.calc(wins.A, ...) # S3 method for default elo.calc(wins.A, elo.A, elo.B, k, ..., adjust.A = 0, adjust.B = 0) # S3 method for formula elo.calc(formula, data, na.action, subset, k = NULL, ...)
wins.A | Numeric vector of wins by team A. |
---|---|
... | Other arguments (not in use at this time). |
elo.A, elo.B | Numeric vectors of elo scores. |
k | A constant k-value (or a vector, where appropriate). |
adjust.A, 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. |
A data.frame with two columns, giving the new Elo values after each update.
elo.prob
, elo.update
,
elo.model.frame
elo.calc(c(1, 0), c(1500, 1500), c(1500, 1600), k = 20) #> elo.A elo.B #> 1 1510.000 1490.000 #> 2 1492.801 1607.199 dat <- data.frame(wins.A = c(1, 0), elo.A = c(1500, 1500), elo.B = c(1500, 1600), k = c(20, 20)) elo.calc(wins.A ~ elo.A + elo.B + k(k), data = dat) #> elo.A elo.B #> 1 1510.000 1490.000 #> 2 1492.801 1607.199