filter_hp {transx} | R Documentation |
This function computes the cyclical component of the Hodrick-Prescot filter.
filter_hp(x, ...)
x |
Univariate vector, numeric or ts object with only one dimension. |
... |
Further arguments passed to |
select_lambda
unemp <- ggplot2::economics$unemploy
unemp_cycle <- filter_hp(unemp, freq = select_lambda("monthly"))
plotx(cbind(unemp, unemp_cycle))