DataPrep: Format data to be used in regression fitting

Description Usage Arguments Value Examples

Description

This function takes in a data frame of plays read in from the CFB Stats play by play file after the time of each play has been added. The function determines a winner of each game, adjusts the down, distance, and spot for kickoffs, determines if the game is against an FCS opponent, adds other indicator variables, and handles overtime plays.

Usage

1
DataPrep(plays, yearvec, return.ot = F)

Arguments

plays

a data frame containing plays from the CFB Stats play.csv file

yearvec

the numeric vector of years to read in the data for

return.ot

logical indicator on what to do with overtime plays

Value

A list containing the plays in regulation. If return.ot is TRUE then the list contains a second data frame for overtime plays

Examples

1
2
3
4
5
plays <- readin("play", 2010:2014)
newtime <- AddTime(plays)
cleandata <- DataPrep(newtime, 2010:2014, return.ot = T)
head(cleandata[[1]])
head(cleandata[[2]])

mattmills49/CFBWinProbability documentation built on May 21, 2019, 1:24 p.m.