powered by
Applies the Hodrick Prescott Filter.
hpfilter(x, lambda)
A univariate time series object containing the trend of the original time series.
A univariate time series object.
The smoothing parameter.
# get data for France data("gap") country <- "France" tsList <- amecoData2input(gap[[country]], alpha = 0.65) hp <- hpfilter(x = tsList$gdp, lambda = 6.25)
Run the code above in your browser using DataLab