Description Usage Arguments Value Examples
all in one function of iterated HP-filter
1 2 3 4 5 6 7 8 | ## S3 method for class 'bHP'
plot(x, plot_type = "dynamic", interval_t = 0.3,
ylab = "", col_raw = "#2D5375", col_trend_h = "#FBB545",
col_trend_f = "red", col_pvalue_BIC = "red", raw_alpha = 255,
trend_h_alpha = 75, trend_f_alpha = 255, pvalue_BIC_alpha = 255,
legend_location = "upleft", iteration_location = "downright",
cex_text = 1.7, cex_legend = 1.5, main = paste0("Figure of ",
x$test_type, " bHP (", plot_type, ")"))
|
x |
the data you want to conduct HP-filter |
lambda |
the turning parameter |
iter |
logical parameter, TRUE is to conduct iterated HP-filter, FALSE is not |
test_type |
the type for creterion |
sig_p |
significant p-value |
Max_Iter |
maximum iterated time |
cycle component, iterated number, p-value .
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | lam <- 100 # tuning parameter for the annaul data
# raw HP filter
bx_HP <- BoostedHP(x, lambda = lam, iter= FALSE)$trend
plot(bx_HP)
# by BIC
bx_BIC <- BoostedHP(IRE, lambda = lam, iter= TRUE, test_type = "BIC")
# by ADF
bx_ADF <- BoostedHP(IRE, lambda = lam, iter= TRUE, test_type = "adf", sig_p = 0.050)
# summarize the outcome
outcome <- cbind(IRE, bx_HP$trend, bx_BIC$trend, bx_ADF$trend)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.