mhpfilter 0.1.0

Initial CRAN Release (2026-02-06)

This is the first official release of mhpfilter to CRAN.

Overview

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).

Core Features

Filtering Functions

Visualization Functions

Utility Functions

Technical Implementation

High Performance

Modern R Integration

Documentation

Comprehensive Vignettes

Function Documentation

Package Website

Methodology Reference

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

Authors and Contributors

Package Author and Maintainer

Muhammad Yaseen
Postdoctoral Research Fellow
School of Mathematical and Statistical Sciences
Clemson University

Original Methodology Authors

Javed Iqbal - State Bank of Pakistan
M. Nadim Hanif - State Bank of Pakistan

Installation

# From CRAN (recommended)
install.packages("mhpfilter")

# From GitHub (development version)
devtools::install_github("myaseen208/mhpfilter")

System Requirements

Testing and Quality Assurance

License

MIT License

Bug Reports and Issues

Please report bugs at: https://github.com/myaseen208/mhpfilter/issues

Acknowledgments


For more information, visit: https://github.com/myaseen208/mhpfilter