lag_best_avg: Lagged Average of Top Results

Description Usage Arguments

View source: R/lag_best_n.R

Description

FIS points are typically the average of the best 5 results over the prior calendar year. This is a fast, Rcpp way to replicate this calculation.

Usage

1
2
lag_best_avg(x, dates, n = 5L, window = 365L, adj = c(1.4, 1.3, 1.2, 1.1,
  1))

Arguments

x

numeric vector of values

dates

dates, assumed to be character in YYYY-MM-DD format

n

integer

window

integer; previous number of days to examine

adj

vector of adjustments for when there are fewer than n values.


joranE/statskier2 documentation built on May 19, 2019, 8:42 p.m.