Learn R Programming

AFR (version 0.3.6)

HP: Hodrick-Prescott filter for time series data

Description

Hodrick-Prescott filter is a data smoothing technique that removes trending in time series data frame

Usage

HP(x, freq = NULL, type = c("lambda", "frequency"), drift = FALSE)

Arguments

x

time-series vector

freq

integer

type

character, indicating the filter type

drift

logical

Examples

Run this code
data(macroKZ)
HP(macroKZ[,2])

Run the code above in your browser using DataLab