Package: mhpfilter 0.1.0
mhpfilter: Modified Hodrick-Prescott Filter with Optimal Smoothing Parameter Selection
High-performance implementation of the Modified Hodrick-Prescott (HP) Filter for decomposing macroeconomic time series into trend and cyclical components. Based on the methodology of Choudhary, Hanif and Iqbal (2014) <doi:10.1080/00036846.2014.894631> "On smoothing macroeconomic time series using the modified HP filter", which uses generalized cross-validation (GCV) to automatically select the optimal smoothing parameter lambda, following McDermott (1997) "An automatic method for choosing the smoothing parameter in the HP filter" (as described in Coe and McDermott (1997) <doi:10.2307/3867497>). Unlike the standard HP filter that uses fixed lambda values (1600 for quarterly, 100 for annual data), this package estimates series-specific lambda values that minimize the GCV criterion. Implements efficient C++ routines via 'RcppArmadillo' for fast computation, supports batch processing of multiple series, and provides comprehensive visualization tools using 'ggplot2'. Particularly useful for cross-country macroeconomic comparisons, business cycle analysis, and when the appropriate smoothing parameter is uncertain.
Authors:
mhpfilter_0.1.0.tar.gz
mhpfilter_0.1.0.zip(r-4.7)mhpfilter_0.1.0.zip(r-4.6)mhpfilter_0.1.0.zip(r-4.5)
mhpfilter_0.1.0.tgz(r-4.6-x86_64)mhpfilter_0.1.0.tgz(r-4.6-arm64)mhpfilter_0.1.0.tgz(r-4.5-x86_64)mhpfilter_0.1.0.tgz(r-4.5-arm64)
mhpfilter_0.1.0.tar.gz(r-4.7-arm64)mhpfilter_0.1.0.tar.gz(r-4.7-x86_64)mhpfilter_0.1.0.tar.gz(r-4.6-arm64)mhpfilter_0.1.0.tar.gz(r-4.6-x86_64)
mhpfilter_0.1.0.tgz(r-4.6-emscripten)
manual.pdf |manual.html✨
card.svg |card.png
mhpfilter/json (API)
NEWS
| # Install 'mhpfilter' in R: |
| install.packages('mhpfilter', repos = c('https://myaseen208.r-universe.dev', 'https://cloud.r-project.org')) |
Bug tracker:https://github.com/myaseen208/mhpfilter/issues
Pkgdown/docs site:https://myaseen208.com
Last updated from:308f6886e1. Checks:13 OK. Indexed: yes.
| Target | Result | Time | Files | Syslog |
|---|---|---|---|---|
| linux-devel-arm64 | OK | 164 | ||
| linux-devel-x86_64 | OK | 169 | ||
| source / vignettes | OK | 224 | ||
| linux-release-arm64 | OK | 162 | ||
| linux-release-x86_64 | OK | 183 | ||
| macos-release-arm64 | OK | 152 | ||
| macos-release-x86_64 | OK | 232 | ||
| macos-oldrel-arm64 | OK | 98 | ||
| macos-oldrel-x86_64 | OK | 243 | ||
| windows-devel | OK | 151 | ||
| windows-release | OK | 157 | ||
| windows-oldrel | OK | 131 | ||
| wasm-release | OK | 137 |
Exports:batch_compareget_gcvget_lambdahp_filtermhp_batchmhp_comparemhp_filterplot_batchplot_comparison
Dependencies:clicollapsecpp11data.tablefarverggplot2gluegtableisobandlabelinglifecycleR6RColorBrewerRcppRcppArmadillorlangS7scalesvctrsviridisLitewithr
Readme and manuals
Help Manual
| Help page | Topics |
|---|---|
| mhpfilter: Fast Modified Hodrick-Prescott Filter | mhpfilter-package mhpfilter |
| Plot Method for mhp Objects | autoplot.mhp |
| Batch Comparison of HP vs Modified HP | batch_compare |
| Extract GCV Value | get_gcv |
| Extract Optimal Lambda | get_lambda |
| Standard Hodrick-Prescott Filter | hp_filter |
| Batch Modified HP Filter | mhp_batch |
| Compare HP vs Modified HP Filter | mhp_compare |
| Modified Hodrick-Prescott Filter | mhp_filter |
| Plot Batch Results | plot_batch |
| Plot Comparison of HP vs Modified HP | plot_comparison |
| Print Method for mhp Objects | print.mhp |
