plot,hfilter-method {deseats}R Documentation

Plot Method for the Results of a Hamilton Filter

Description

Visualize the results of an applied Hamilton filter.

Usage

## S4 method for signature 'hfilter'
plot(x, which = NULL, ...)

Arguments

x

an object of class "hfilter", as returned by the function hamilton_filter.

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 which = NULL, the plot type can be selected interactively in the console.

...

further arguments to pass to plot.ts or matplot (depending on whether only one time series or multiple time series are shown in the plot).

Value

This function returns NULL.

Author(s)

Examples

est <- hamilton_filter(log(EXPENDITURES))
plot(est, which = 3, col = c(1, 6))
plot(est, which = 4)


[Package deseats version 1.1.0 Index]