Skip to contents

Compute the Fidelity, Smoothness and Timeliness (FST) criteria

Usage

fst(weights, lags, passband = pi/6, ...)

Arguments

weights

either a "moving_average" or a numeric vector containing weights.

lags

Lags of the moving average (when weights is not a "moving_average").

passband

Passband threshold for timeliness criterion.

...

other unused arguments.

Value

The values of the 3 criteria, the gain and phase of the associated filter.

References

Grun-Rehomme, Michel, Fabien Guggemos, and Dominique Ladiray (2018). “Asymmetric Moving Averages Minimizing Phase Shift”. In: Handbook on Seasonal Adjustment, https://ec.europa.eu/eurostat/web/products-manuals-and-guidelines/-/ks-gq-18-001.

Examples

filter <- lp_filter(horizon = 6, kernel = "Henderson", endpoints = "LC")
fst(filter[, "q=0"])
#>   Fidelity Smoothness Timeliness 
#> 0.35750983 1.13761087 0.03408826 
# To compute the statistics on all filters:
fst(filter)
#>                      q=6          q=5          q=4          q=3          q=2
#> Fidelity    2.038158e-01 1.992842e-01 1.882514e-01 1.817971e-01 0.2012127809
#> Smoothness  8.335318e-03 1.718954e-02 2.053650e-02 9.763906e-03 0.0800330845
#> Timeliness -3.009266e-35 2.907314e-05 6.954826e-05 5.078351e-05 0.0003411454
#>                    q=1        q=0
#> Fidelity   0.261459364 0.35750983
#> Smoothness 0.413844949 1.13761087
#> Timeliness 0.005496608 0.03408826