predict.elo {elo} | R Documentation |
Make Predictions on an elo
Object
Description
Make Predictions on an elo
Object
Usage
## S3 method for class 'elo.run'
predict(object, newdata, ...)
## S3 method for class 'elo.run.regressed'
predict(object, newdata, regressed = FALSE, ...)
## S3 method for class 'elo.run.multiteam'
predict(object, newdata, ...)
## S3 method for class 'elo.glm'
predict(object, newdata, type = "response", ...)
## S3 method for class 'elo.running'
predict(object, newdata, running = TRUE, ...)
## S3 method for class 'elo.markovchain'
predict(object, newdata, ...)
## S3 method for class 'elo.colley'
predict(object, newdata, ...)
## S3 method for class 'elo.winpct'
predict(object, newdata, ...)
Arguments
object |
An model from which to get predictions. |
newdata |
A new dataset containing the same variables as the call
that made |
... |
Other arguments. |
regressed |
See the note on |
type |
See |
running |
logical, denoting whether to use the running predicted values. Only makes
sense if |
Details
Note that the "elo.glm.running"
objects will use a model fit on all the data to predict.
Value
A vector of win probabilities.
Examples
data(tournament)
t1 <- head(tournament, -3)
t2 <- tail(tournament, 3)
results <- elo.run(score(points.Home, points.Visitor) ~ team.Home + team.Visitor,
data = t1, k = 20)
predict(results)
predict(results, newdata = t2)
results <- elo.glm(score(points.Home, points.Visitor) ~ team.Home + team.Visitor, data = t1,
subset = points.Home != points.Visitor)
predict(results)
predict(results, newdata = t2)
results <- elo.markovchain(score(points.Home, points.Visitor) ~ team.Home + team.Visitor, data = t1,
subset = points.Home != points.Visitor, k = 0.7)
predict(results)
predict(results, newdata = t2)
results <- elo.colley(score(points.Home, points.Visitor) ~ team.Home + team.Visitor, data = t1,
subset = points.Home != points.Visitor)
predict(results)
predict(results, newdata = t2)
results <- elo.winpct(score(points.Home, points.Visitor) ~ team.Home + team.Visitor, data = t1,
subset = points.Home != points.Visitor, k = 0.7)
predict(results)
predict(results, newdata = t2)
[Package elo version 3.0.2 Index]