ffs_generate_projections: Generate Projections

View source: R/4_projections.R

ffs_generate_projectionsR Documentation

Generate Projections

Description

Runs the bootstrapped resampling of player week outcomes on the latest rankings and rosters for a given number of seasons and weeks per season.

Usage

ffs_generate_projections(
  adp_outcomes,
  latest_rankings,
  n_seasons = 100,
  weeks = 1:14,
  rosters = NULL
)

Arguments

adp_outcomes

a dataframe of adp-based weekly outcomes, as created by ffs_adp_outcomes()

latest_rankings

a dataframe of rankings, as created by ffs_latest_rankings()

n_seasons

number of seasons, default is 100

weeks

a numeric vector of weeks to simulate, defaults to 1:14

rosters

a dataframe of rosters, as created by ffs_rosters() - optional, reduces computation to just rostered players

Value

a dataframe of weekly scores for each player in the simulation, approximately of length n_seasons x n_weeks x latest_rankings

See Also

vignette("custom") for example usage

Examples


# cached examples
adp_outcomes <- .ffs_cache("adp_outcomes.rds")
latest_rankings <- .ffs_cache("latest_rankings.rds")

ffs_generate_projections(adp_outcomes, latest_rankings)



ffsimulator documentation built on Feb. 16, 2023, 5:37 p.m.