View source: R/goalmodel_misc.R
weights_dc | R Documentation |
This function computes weights that give less weight to games further back in time.
weights_dc(dates, xi = 0, currentDate = NULL)
dates |
a vector of dates (of type Date). |
xi |
A numeric with the time dumping factor. Ususally a value between 0.001 and 0.003. |
currentDate |
The date which to count backwards from. Default to the latest date in dates. |
The weigths w are computed using the formula
w = exp(-xi*t)
where xi is a tuning parameter that decides the amount of down-weighting, and t is the number of days since currentDate. If any date in dates are after currentDate, the corresponding weights are set to 0.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.