filter_boosted_hp( x, lambda = 1600, iter = TRUE, 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. |
This function has been retrieved and rewritten from https://github.com/zhentaoshi/Boosted_HP_filter/blob/master/R/BoostedHP.R
Returns a vector with the same class and attributes as the input vector.
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
#> Error in filter_boosted_hp(unemp): could not find function "filter_boosted_hp"#> Error in cbind(unemp, unemp_cycle): object 'unemp_cycle' not found