Learn R Programming

elo (version 2.0.0)

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

Description

Make Predictions on an elo.glm Object

Usage

# S3 method for elo.glm
predict(object, newdata, type = "response", ...)

# S3 method for elo.running predict(object, newdata, running = TRUE, ...)

Arguments

object

An object of class "elo.glm".

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.

type
...

Other arguments.

running

logical, denoting whether to use the running predicted values. Only makes sense if newdata is missing.

Value

A vector of win probabilities.

Details

Note that the "elo.glm.running" objects will use a model fit on all the data to predict.

Examples

Run this code
# NOT RUN {
data(tournament)
t1 <- head(tournament, -3)
t2 <- tail(tournament, 3)
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)
# }

Run the code above in your browser using DataLab