hpfilter {RGAP}R Documentation

HP filter

Description

Applies the Hodrick Prescott Filter.

Usage

hpfilter(x, lambda)

Arguments

x

A univariate time series object.

lambda

The smoothing parameter.

Value

A univariate time series object containing the trend of the original time series.

Examples

# get data for France
data("gap")
country <- "France"
tsList <- amecoData2input(gap[[country]], alpha = 0.65)
hp <- hpfilter(x = tsList$gdp, lambda = 6.25)

[Package RGAP version 0.1.1 Index]