powered by
(Beta verson of) Extends the moving average smoothing of a time series to a histogram time series, using L2 Wasserstein distance.
HTS.moving.averages(HTS, k = 3, weights = rep(1, k))
A HTS object (a histogram time series).
HTS
an integer value, the number of elements for moving averages
a vector of positive weights for a weighted moving average
a list with the results of the smoothing procedure.
k
the number of elements for the average
weights
the vector of weights for smoothing
AveragedHTS
The smoothed HTS
# NOT RUN { mov.av.smoothed=HTS.moving.averages(HTS=RetHTS, k=5) # a show method for HTS must be implemented you can see it using # str(mov.av.smoothed$AveragedHTS) # }
Run the code above in your browser using DataLab