Learn R Programming

lpirfs (version 0.1.1)

hp_filter: Decompose a times series via the Hodrick-Prescott filter

Description

Estimates cyclical and trend component with HP-filter by Hodrick and Prescott (1997). The function is based on the function hpfilter from the package mFilter by Mehmet Balcilar.

Usage

hp_filter(x, lambda)

Arguments

x

Column matrix with numeric values.

lambda

Numeric value.

References

Hodrick, R.J., and Prescott, E. C. Prescott (1997) "Postwar U.S. Business Cycles: An Empirical Investigation." Journal of Money, Credit and Banking, 29(1), 1-16.