autoplot,hfilter-method | R Documentation |
ggplot2
Plot Method for the Results of a Hamilton FilterVisualize the results of an applied Hamilton filter in the style of
ggplot2
.
## S4 method for signature 'hfilter'
autoplot(object, which = NULL, ...)
object |
an object of class |
which |
either a string or a number can be entered to select a
plot type from the function call; options are (1) a facet plot of the
components, (2) the observed time series, (3) the observations together
with the fitted values, and (4) the residuals; for |
... |
currently without use, implemented for compatibility. |
This method returns a ggplot2
plot object, i.e. an object of classes
"gg"
and "ggplot"
.
Dominik Schulz (Research Assistant) (Department of Economics, Paderborn
University),
Author and Package Creator
est <- hamilton_filter(log(EXPENDITURES))
autoplot(est, which = 3, col = c(1, 6))
autoplot(est, which = 4)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.