create_newdata_dataframe: Helper Function to Replace Team Names in Score File with a...

Description Usage Arguments Details Value Author(s)

Description

Helper function not exported for users. Used by predict.fbRanks() to construct the newdata data frame.

Usage

1
create.newdata.dataframe(x, newdata, min.date, max.date, ...)

Arguments

x

A fbRanks object.

newdata

A data.frame of data to use for predicting. At the minimum home.team, away.team and any predictors in x (the fbRanks model) are required.

max.date, min.date

Used for filtering the matches in newdata.

...

Other arguments for to use for filtering the scores data.frame or newdata data.frame. You can use any column in the scores or teams data frames. Name of the argument should be the column name and values passed in as a vector.

Details

This is taking a list or data frame passed in in the newdata argument of a predict.fbRanks call and constructing a data frame that can be passed to glm or lmer. It ensures that the uniform names (name column of x$teams) are used. It uses resolve.team.names.

Value

A list with elements scores and teams.

Author(s)

Eli Holmes, Seattle, USA.

eeholmes(at)u(dot)washington(dot)com


fbRanks documentation built on May 1, 2019, 8:01 p.m.