hpfilter | R Documentation |
Applies the Hodrick Prescott Filter.
hpfilter(x, lambda)
x |
A univariate time series object. |
lambda |
The smoothing parameter. |
A univariate time series object containing the trend of the original time series.
# get data for France
data("gap")
country <- "France"
tsList <- amecoData2input(gap[[country]], alpha = 0.65)
hp <- hpfilter(x = tsList$gdp, lambda = 6.25)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.