get_design: Get design matrix and values from a season

View source: R/PrepData.R

get_designR Documentation

Get design matrix and values from a season

Description

Get design matrix and values from a season

Usage

get_design(data)

Arguments

data

A data frame with columns for Team, Score, Year, and Week produced by scrape_games. Last 3 columns must be numeric.

Value

A list of 9 components, including 2 design matrices (X, X_sum), and 3 vectors of observations of season data (Y_diff, Y_sum, Y_binary), the list of teams, original dataframe of scores, and date range of games.

Examples

games <- regssn2021
L <- get_design(games)

przybylee/NFLpredictions documentation built on Feb. 9, 2025, 9:22 p.m.