lp_filter: Local Polynomials Filters

View source: R/lp_filters.R

lp_filterR Documentation

Local Polynomials Filters

Description

Local Polynomials Filters

Usage

lp_filter(
  horizon = 6,
  degree = 3,
  kernel = c("Henderson", "Uniform", "Biweight", "Trapezoidal", "Triweight", "Tricube",
    "Gaussian", "Triangular", "Parabolic"),
  endpoints = c("LC", "QL", "CQ", "CC", "DAF", "CN"),
  ic = 4.5,
  tweight = 0,
  passband = pi/12
)

Arguments

horizon

horizon (bandwidth) of the symmetric filter.

degree

degree of polynomial.

kernel

kernel uses.

endpoints

methode for endpoints.

ic

ic ratio.

tweight

timeliness weight.

passband

passband threshold.

Details

  • "LC": Linear-Constant filter

  • "QL": Quadratic-Linear filter

  • "CQ": Cubic-Quadratic filter

  • "CC": Constant-Constant filter

  • "DAF": Direct Asymmetric filter

  • "CN": Cut and Normalized Filter

Value

list with coefficients, gain and phase values

An object of class "rkhs_filter", which is a list of 4 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)

References

Proietti, Tommaso and Alessandra Luati (2008). “Real time estimation in local polynomial regression, with application to trend-cycle analysis”.

See Also

lp_filter

Examples

henderson_f <- lp_filter(horizon = 6, kernel = "Henderson")
plot_coef(henderson_f)

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