plot_comparison() draws the series with the trends of the HP filter (at the conventional
\(\lambda\) of its frequency) and of the modified HP filter, and optionally the cycles; with
fmhp = TRUE the fully modified HP filter is added.
Usage
plot_comparison(
x,
frequency = c("quarterly", "annual", "monthly"),
max_lambda = 100000L,
show_cycle = FALSE,
fmhp = FALSE
)Arguments
- x
a numeric vector or a
tsobject, without missing values; at least 5 observations.- frequency
"quarterly"(default),"annual"or"monthly".- max_lambda
the largest \(\lambda\) of the search over \(1, 2, \dots,\)
max_lambda(default 100000).- show_cycle
draw the cycles too (default
FALSE).- fmhp
add the fully modified HP filter (default
FALSE; it usesmax_lambda = 3000and the other defaults offmhp_filter()on the scale of the series).
Author
Muhammad Yaseen (myaseen208@gmail.com)
