fst_filter: Estimation of a filter using the...

View source: R/fst_filters.R

fst_filterR Documentation

Estimation of a filter using the Fidelity-Smoothness-Timeliness criteria

Description

Estimation of a filter using the Fidelity-Smoothness-Timeliness criteria

Usage

fst_filter(
  lags = 6,
  leads = 0,
  pdegree = 2,
  smoothness.weight = 1,
  smoothness.degree = 3,
  timeliness.weight = 0,
  timeliness.passband = pi/6,
  timeliness.antiphase = TRUE
)

Arguments

lags

Lags of the filter (should be positive).

leads

Leads of the filter (should be positive or 0).

pdegree

Local polynomials preservation: max degree.

smoothness.weight

Weight for the smoothness criterion (in [0, 1]).

smoothness.degree

Degree of the smoothness criterion (3 for Henderson).

timeliness.weight

Weight for the Timeliness criterion (in [0, 1[). sweight+tweight should be in [0,1].

timeliness.passband

Passband for the timeliness criterion (in radians). The phase effect is computed in [0, passband].

timeliness.antiphase

boolean indicating if the timeliness should be computed analytically (TRUE) or numerically (FALSE).

Value

An object of class "fst_filter", which is a list of 5 elements:

  • "internal"Java object used for internal functions

  • "filters.coef"The coefficients of the selected filter

  • "filters.gain"The gain function between 0 and pi (601 observations)

  • "filters.phase"The phase function between 0 and pi (601 observations)

  • "criteria"The value of the tree criteria

References

Grun-Rehomme, Michel, Fabien Guggemos, and Dominique Ladiray (2018). “Asymmetric Moving Averages Minimizing Phase Shift”. In: Handbook on Seasonal Adjustment.

Examples

filter <- fst_filter(lags = 6, leads = 0)
filter

palatej/rjdfilters documentation built on May 8, 2023, 6:28 a.m.