Learn R Programming

seasonal (version 0.40.0)

final: Time Series from a Seasonal Adjustment Model

Description

These functions extract time series from a "seas" object.

Usage

final(object)

original(object)

trend(object)

irregular(object)

regressioneffects(object)

## S3 method for class 'seas': residuals(object, ...)

Arguments

object
an object of class "seas".
...
not used. For compatibility with the generic.

Value

  • returns a "ts" object, depending on the function.

    regressioneffects returns a "mts" object, containing the regression variables multiplied by the vector of estimated regression coefficients

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 of seasonal.

Examples

Run this code
m <- seas(AirPassengers)

final(m)
original(m)
irregular(m)
trend(m)
regressioneffects(m)

# trading day and easter adjustment w/o seasonal adjustment
summary(m)
re <- regressioneffects(m)
ce <- re[, 'Trading.Day'] + re[, 'Holiday']
# be aware of the log transformation
AirPassengersWoTd <- exp(log(AirPassengers) - ce)

# NA handling
AirPassengersNA <- window(AirPassengers, end = 1962, extend = TRUE)
final(seas(AirPassengersNA, na.action = na.omit))    # no NA in final series
final(seas(AirPassengersNA, na.action = na.exclude)) # NA in final series
# final(seas(AirPassengersNA, na.action = na.fail))    # fails

Run the code above in your browser using DataLab