weights_dc: Compute Dixon-Coles weights

View source: R/goalmodel_misc.R

weights_dcR Documentation

Compute Dixon-Coles weights

Description

This function computes weights that give less weight to games further back in time.

Usage

weights_dc(dates, xi = 0, currentDate = NULL)

Arguments

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.

Details

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.


opisthokonta/goalmodel documentation built on April 3, 2024, 1:32 a.m.