filter_hp {transx}R Documentation

Hodrick-Prescot Filter

Description

Maturing lifecycle

This function computes the cyclical component of the Hodrick-Prescot filter.

Usage

filter_hp(x, ...)

Arguments

x

⁠[univariate vector]⁠

Univariate vector, numeric or ts object with only one dimension.

...

Further arguments passed to hpfilter.

See Also

select_lambda

Examples


unemp <- ggplot2::economics$unemploy
unemp_cycle <- filter_hp(unemp, freq = select_lambda("monthly"))
plotx(cbind(unemp, unemp_cycle))


[Package transx version 0.0.1 Index]