View source: R/H_time_series.R
HTS.moving.averages | R Documentation |
(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))
HTS |
A |
k |
an integer value, the number of elements for moving averages |
weights |
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
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.