Learn R Programming

seasonal (version 0.40.0)

plot.seas: Seasonal Adjustment Plots

Description

Functions to graphically analyze a "seas" object. More graphs can be plotted with standard R functions (see examples). For diagnostical statistics, see qs.

Usage

## S3 method for class 'seas':
plot(x, outliers = TRUE, trend = FALSE,
  main = "unadjusted and seasonally adjusted series", ...)

residplot(x, outliers = TRUE, ...)

## S3 method for class 'seas': monthplot(x, choice = "seasonal", ...)

## S3 method for class 'slidingspans': plot(x, main = "sliding spans", ...)

## S3 method for class 'revisions': plot(x, main = "revisions", ...)

Arguments

x
an object of class "seas", usually, a result of a call to seas.
outliers
logical, should the oultiers be drawn.
trend
logical, should the trend be drawn.
choice
character string, "seasonal" (default) or "irregular".
main
character string, title of the graph.
...
further arguments passed to the plotting functions.

Value

  • All plot functions returns a plot as their side effect.

Details

plot calls the plot method for class "seas". It plots the adjusted and unadjusted series, as well as the outliers. Optionally draws the trend series.

residplot plots the residuals and the outliers.

monthplot calls the monthplot method for class "seas". It plot the seasonal and SI component periodwise. Like the default method `monthplot` can be used for all frequencies.

plot.slidingspans calls the plot method for objects of class "slidingspans". It draws the seasonal component for the analyzed spans.

plot.revisions calls the plot method for objects of class "revisons". It draws concurrent and the latest estimation of the seasonal adjusted series.

References

Vignette with a more detailed description: http://cran.r-project.org/web/packages/seasonal/vignettes/seas.pdf

Wiki page with a comprehensive list of R examples from the X-13ARIMA-SEATS manual: https://github.com/christophsax/seasonal/wiki/Examples-of-X-13ARIMA-SEATS-in-R

Official X-13ARIMA-SEATS manual: http://www.census.gov/ts/x13as/docX13AS.pdf

See Also

seas, for the main function.

qs, for diagnostical statistics.

Examples

Run this code
m <- seas(AirPassengers)

plot(m)
plot(m, outliers = FALSE)
plot(m, trend = TRUE)

residplot(m)
residplot(m, outliers = FALSE)

monthplot(m)

plot(slidingspans(m))
plot(revisions(m))

# use R functions to analyze "seas" models
pacf(resid(m))
spectrum(diff(resid(m)))
plot(density(resid(m)))
qqnorm(resid(m))

Run the code above in your browser using DataLab