Description Usage Arguments Value Examples
This function computes the cyclical component of the Hamilton filter.
1 | filter_hamilton(x, p = 4, horizon = 8, fill = NA)
|
x |
Univariate vector, numeric or ts object with only one dimension. |
p |
A value indicating the number of lags |
horizon |
A value indicating the number of periods to look ahead. |
fill |
Numeric value(s) or function used to fill observations. |
Returns a vector with the same class and attributes as the input vector.
1 2 3 | unemp <- ggplot2::economics$unemploy
unemp_cycle <- filter_hamilton(unemp)
plotx(cbind(unemp, unemp_cycle))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.