Skip to contents

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 = 3.5,
  tweight = 0,
  passband = pi/12
)

Arguments

horizon

horizon (bandwidth) of the symmetric filter.

degree

degree of polynomial.

kernel

kernel uses.

endpoints

method for endpoints.

ic

ic ratio.

tweight

timeliness weight.

passband

passband threshold.

Value

a finite_filters() object.

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

References

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

Examples

henderson_f <- lp_filter(horizon = 6, kernel = "Henderson")
#> Error in .jcall("jdplus/filters/base/r/LocalPolynomialFilters", "Ljdplus/toolkit/base/core/math/linearfilters/ISymmetricFiltering;",     "filters", as.integer(horizon), as.integer(degree), kernel,     endpoints, d, tweight, passband): java.lang.UnsupportedClassVersionError: jdplus/toolkit/base/core/math/linearfilters/IFiniteFilter has been compiled by a more recent version of the Java Runtime (class file version 65.0), this version of the Java Runtime only recognizes class file versions up to 61.0
plot_coef(henderson_f)
#> Error: object 'henderson_f' not found