hpfilter: The One- And Two-Sided Hodrick-Prescott Filter

Provides two functions that implement the one-sided and two-sided versions of the Hodrick-Prescott filter. The one-sided version is a Kalman filter-based implementation, whereas the two- sided version uses sparse matrices for improved efficiency. References: Hodrick, R. J., and Prescott, E. C. (1997) <doi:10.2307/2953682> Mcelroy, T. (2008) <doi:10.1111/j.1368-423X.2008.00230.x> Meyer-Gohde, A. (2010) <https://ideas.repec.org/c/dge/qmrbcd/181.html> For more references, see the vignette.

Package details

AuthorAlexandru Monahov
MaintainerAlexandru Monahov <alexandru.monahov@proton.me>
LicenseCC BY-SA 4.0
URL https://www.alexandrumonahov.eu.org/projects
Package repositoryView on CRAN
Installation Install the latest version of this package by entering the following in R:

Try the hpfilter package in your browser

Any scripts or data that you put into this service are public.

hpfilter documentation built on May 31, 2023, 6:43 p.m.