neverhpfilter
R package recreating econometric methods proposed in "Why You Should Never Use the Hodrick-Prescott Filter" by James Hamilton
Science Score: 23.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
○codemeta.json file
-
○.zenodo.json file
-
✓DOI references
Found 2 DOI reference(s) in README -
○Academic publication links
-
✓Committers with academic emails
2 of 3 committers (66.7%) from academic institutions -
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (12.8%) to scientific vocabulary
Keywords
Repository
R package recreating econometric methods proposed in "Why You Should Never Use the Hodrick-Prescott Filter" by James Hamilton
Basic Info
- Host: GitHub
- Owner: JustinMShea
- Language: R
- Default Branch: master
- Homepage: https://justinmshea.github.io/neverhpfilter/
- Size: 17.9 MB
Statistics
- Stars: 16
- Watchers: 3
- Forks: 7
- Open Issues: 0
- Releases: 0
Topics
Metadata Files
README.md
neverhpfilter Package
<!-- badges: start -->
<!-- badges: end -->
Introduction
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 solution. Hamilton (2017) doi:10.3386/w23429
Hamilton's abstract offers an excellent introduction:
(1) The HP filter produces series with spurious dynamic relations that have no basis in the underlying data-generating process. (2) Filtered values at the end of the sample are very different from those in the middle, and are also characterized by spurious dynamics. (3) A statistical formalization of the problem typically produces values for the smoothing parameter vastly at odds with common practice, e.g., a value for $\lambda$ far below 1600 for quarterly data. (4) There's a better alternative. A regression of the variable at date $t + h$ on the four most recent values as of date $t$ offers a robust approach to detrending that achieves all the objectives sought by users of the HP filter with none of its drawbacks.
Getting Started
Install from CRAN on R version >= 3.5.0.
{r}
install.packages("neverhpfilter")
Or install from the Github master branch on R version >= 3.5.0.
{r}
devtools::install_github("JustinMShea/neverhpfilter")
Load the package
{r}
library(neverhpfilter)
Package Documentation
The package consists of 2 estimation functions, 12 economic xts objects, an xts object containing Robert Shiller's U.S. Stock Markets and CAPE Ratio data from 1871 to Present, and a data.frame containing the original filter estimates found on table 2 of Hamilton (2017) doi:10.3386/w23429
Documentation for each can be found here:
Finally, a vignette recreating the estimates of the original work can be found in Reproducing Hamilton.
Owner
- Name: Justin M. Shea
- Login: JustinMShea
- Kind: user
- Location: Chicago, IL
- Website: linkedin.com/in/justinmshea
- Repositories: 46
- Profile: https://github.com/JustinMShea
GitHub Events
Total
- Issues event: 5
- Watch event: 2
- Issue comment event: 3
- Push event: 6
Last Year
- Issues event: 5
- Watch event: 2
- Issue comment event: 3
- Push event: 6
Committers
Last synced: over 3 years ago
All Time
- Total Commits: 328
- Total Committers: 3
- Avg Commits per committer: 109.333
- Development Distribution Score (DDS): 0.247
Top Committers
| Name | Commits | |
|---|---|---|
| JustinMShea | j****a@m****u | 247 |
| JustinMShea | j****a@r****u | 80 |
| Justin M. Shea | J****a@u****m | 1 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: over 1 year ago
All Time
- Total issues: 8
- Total pull requests: 2
- Average time to close issues: 7 days
- Average time to close pull requests: 1 minute
- Total issue authors: 4
- Total pull request authors: 1
- Average comments per issue: 0.38
- Average comments per pull request: 0.0
- Merged pull requests: 2
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 1
- Pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 1
- Pull request authors: 0
- Average comments per issue: 0.0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- JustinMShea (6)
- adzemski (1)
- SvN-HEC (1)
- jameshowey (1)
Pull Request Authors
- JustinMShea (2)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 1
-
Total downloads:
- cran 113 last-month
- Total dependent packages: 0
- Total dependent repositories: 0
- Total versions: 4
- Total maintainers: 1
cran.r-project.org: neverhpfilter
An Alternative to the Hodrick-Prescott Filter
- Homepage: https://justinmshea.github.io/neverhpfilter/
- Documentation: http://cran.r-project.org/web/packages/neverhpfilter/neverhpfilter.pdf
- License: GPL-3
-
Latest release: 0.5-0
published 11 months ago
Rankings
Maintainers (1)
Dependencies
- R >= 3.5.0 depends
- xts >= 0.11 depends
- zoo >= 1.8 depends
- simplermarkdown * suggests
- tinytest * suggests