predict.elo.glm {elo}R Documentation

Make Predictions on an elo.glm Object

Description

Make Predictions on an elo.glm Object

Usage

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

## S3 method for class '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

See predict.glm

...

Other arguments.

running

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

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.glm(score(points.Home, points.Visitor) ~ team.Home + team.Visitor, data = t1,
  subset = points.Home != points.Visitor)
predict(results)
predict(results, newdata = t2)

[Package elo version 2.0.0 Index]