Learn R Programming

HistDAWass (version 1.0.4)

HTS.moving.averages: 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

Run this code
# 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