Description Usage Arguments Value Source References Examples
This function computes the cyclical component of the Boosted Hodrick-Prescot filter.
1 2 3 4 5 6 7 | filter_boosted_hp(
x,
lambda = 1600,
stopping = "nonstop",
sig_p = 0.05,
max_iter = 100
)
|
x |
Univariate vector, numeric or ts object with only one dimension. |
lambda |
Smoothness penalty parameter. |
stopping: |
|
sig_p: |
The significance level of the ADF test as the stopping criterion. It is used only when stopping == "adf". |
max_iter: |
The maximum number of iterations. |
Returns a vector with the same class and attributes as the input vector.
This function has been retrieved and rewritten from https://github.com/zhentaoshi/Boosted_HP_filter/blob/master/R/BoostedHP.R
Phillips, P.C.B. and Shi, Z. (2021), BOOSTING: WHY YOU CAN USE THE HP FILTER. International Economic Review. https://doi.org/10.1111/iere.12495
1 2 3 | unemp <- ggplot2::economics$unemploy
unemp_cycle <- filter_boosted_hp(unemp)
plotx(cbind(unemp, unemp_cycle))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.