HTS.moving.averages: Smoothing with moving averages of a histogram time series

View source: R/H_time_series.R

HTS.moving.averagesR Documentation

Smoothing with moving averages of a histogram time series

Description

(Beta verson of) Extends the moving average smoothing of a time series to a histogram time series, using L2 Wasserstein distance.

Usage

HTS.moving.averages(HTS, k = 3, weights = rep(1, k))

Arguments

HTS

A HTS object (a histogram time series).

k

an integer value, the number of elements for moving averages

weights

a vector of positive weights for a weighted moving average

Value

a list with the results of the smoothing procedure.

Slots

k

the number of elements for the average

weights

the vector of weights for smoothing

AveragedHTS

The smoothed HTS

Examples

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)

Airpino/HistDAWass documentation built on Jan. 30, 2024, 7:53 p.m.