Skip to contents

Core Filtering Functions

Main functions for applying HP and Modified HP filters to time series data. The Modified HP filter automatically selects the optimal smoothing parameter lambda using generalized cross-validation (GCV).

mhp_filter()
Modified Hodrick-Prescott Filter
hp_filter()
Standard Hodrick-Prescott Filter
mhp_compare()
Compare HP vs Modified HP Filter

Batch Processing

Efficient batch processing functions for multiple time series. Ideal for cross-country comparisons and analyzing multiple economic indicators simultaneously.

mhp_batch()
Batch Modified HP Filter
batch_compare()
Batch Comparison of HP vs Modified HP

Visualization Functions

Professional visualization tools using ggplot2. Create publication-ready plots of trend-cycle decompositions with minimal code.

autoplot(<mhp>)
Plot Method for mhp Objects
plot_comparison()
Plot Comparison of HP vs Modified HP
plot_batch()
Plot Batch Results

Utility Functions

Helper functions for extracting results and information from filter objects.

get_lambda()
Extract Optimal Lambda
get_gcv()
Extract GCV Value
print(<mhp>)
Print Method for mhp Objects

Package Documentation

Overall package documentation and information.

mhpfilter-package mhpfilter
mhpfilter: Fast Modified Hodrick-Prescott Filter