Learn R Programming

elo (version 2.0.0)

predict.elo.run: Make Predictions on an elo.run Object

Description

Make Predictions on an elo.run Object

Usage

# S3 method for elo.run
predict(object, newdata, ...)

# S3 method for elo.run.regressed predict(object, newdata, regressed = FALSE, ...)

Arguments

object

An object of class "elo.run".

newdata

A new dataset containing the same variables as the call that made object. If missing, the predicted win probabilities from object will be returned.

...

Other arguments to be passed to elo.prob.

regressed

See the note on final.elos.

Value

A vector of win probabilities.

Examples

Run this code
# NOT RUN {
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)
# }

Run the code above in your browser using DataLab