The hardware and bandwidth for this mirror is donated by dogado GmbH, the Webhosting and Full Service-Cloud Provider. Check out our Wordpress Tutorial.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]dogado.de.
This is the first official release of mhpfilter to CRAN.
mhpfilter implements the Modified Hodrick-Prescott (HP) Filter for decomposing macroeconomic time series into trend and cyclical components. The package automatically selects the optimal smoothing parameter λ using generalized cross-validation (GCV), based on the methodology of Choudhary, Hanif & Iqbal (2014).
mhp_filter() - Modified HP filter with automatic λ
selection via GCVhp_filter() - Standard HP filter with fixed λ
parametermhp_compare() - Compare HP vs Modified HP for single
seriesmhp_batch() - Batch processing for multiple time
seriesbatch_compare() - Batch comparison of HP vs Modified
HPautoplot.mhp() - ggplot2-based visualization for mhp
objectsplot_comparison() - Visual comparison of HP vs Modified
HP resultsplot_batch() - Visualization of batch processing
resultsget_lambda() - Extract optimal λ from resultsget_gcv() - Extract GCV value from resultsprint.mhp() - Print method for mhp class objectsdata.table (≥ 1.14.0)collapse (≥ 2.0.0) for fast
statisticskit (≥ 0.0.11) utilitiestidyverse (≥ 2.0.0) and
fastverse (≥ 0.3.0)This implementation is based on:
Choudhary, M.A., Hanif, M.N., & Iqbal, J. (2014). “On smoothing macroeconomic time series using the modified HP filter.” Applied Economics, 46(19), 2205-2214. https://doi.org/10.1080/00036846.2014.896982
Muhammad Yaseen
Postdoctoral Research Fellow
School of Mathematical and Statistical Sciences
Clemson University
Javed Iqbal - State Bank of Pakistan
M. Nadim Hanif - State Bank of Pakistan
# From CRAN (recommended)
install.packages("mhpfilter")
# From GitHub (development version)
devtools::install_github("myaseen208/mhpfilter")MIT License
Please report bugs at: https://github.com/myaseen208/mhpfilter/issues
For more information, visit: https://github.com/myaseen208/mhpfilter
These binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.
Health stats visible at Monitor.