function used to compute adstock transformation

get_adstock(x, retain)

Arguments

x

numeric vector or time series of values to be adstocked

retain

between 0 and 1, the amount of previous time points value that effects the current time point

Value

a numeric vector that shows the adstocked values of x