In the working paper titled "Why You Should Never Use the Hodrick-Prescott
Filter", James D. Hamilton proposes a new alternative to economic time series
filtering. The neverhpfilter package provides functions and data for reproducing his work. Hamilton (2017)
In the working paper titled "Why You Should Never Use the Hodrick-Prescott Filter", James D. Hamilton proposes an interesting new alternative to economic time series filtering. The
neverhpfilter package provides functions for implementing his solution. Hamilton (2017) doi:10.3386/w23429
Hamilton's abstract offers an excellent introduction:
Install from the Github master branch on R version >= 3.4.0.
Load the package
Read the vignette Reproducing Hamilton.
The package consists of 2 core functions documented here:
Functions consolidated into just two functions.
yth_glm remains unchanged, while
yth_filter has been given an output parameter to specify the return of specific series. This feature eliminates the need for
yth_trend, which are helpful when apply the function to multiple data sets.
Nine additional data sets have been added to replicate most all of Hamilton's table 2.
The "Reproducing Hamilton" vignette has been expanded and content has been edited for clarity.
First complete version. Has four functions
yth_trend. Three data sets are included to reproduce part of Hamilton's work.
Hamilton_table_2. A vignette titled "Reproducing Hamilton" illustrated the work and shows users how to implement functions.