m <- seas(AirPassengers)
series(m, "fct") # re-evaluate with the forecast spec activated
# more than one series
series(m, c("d7", "d8", "fct"))
m <- seas(AirPassengers, forecast.save = "fct")
series(m, "fct") # no re-evaluation (much faster!)
# using long names
series(m, "forecast.forecasts")
# history spec
series(m, "history.trendestimates")
series(m, "history.sfestimates")
series(m, "history.saestimates")
series(m, c("history.sfestimates", "history.trendestimates"))
# slidingspans spec
series(m, "slidingspans.sfspans")
series(m, "slidingspans.tdspans")
### Some X-13ARIMA-SEATS functions can be replicated in R:
# X-13ARIMA-SEATS spectrum
plot(series(m, "spectrum.specorig")[,-1], t = "l")
# R equivalent: spectrum from stats
spectrum(diff(log(AirPassengers)), method = "ar")
# X-13ARIMA-SEATS pacf
x13.pacf <- series(m, "identify.pacf")
plot(x13.pacf[,1:2])
lines(x13.pacf[,3])
lines(-x13.pacf[,3])
# R equivalent: pacf from stats
pacf(AirPassengers, lag.max = 35)
### advanced examples
# (for more examples, see the wiki.)
# trading day and easter adjustment w/o seasonal adjustment
summary(m)
re <- series(m, "estimate.regressioneffects")
ce <- re[, 'Trading.Day'] + re[, 'Holiday']
# be aware of the log transformation
AirPassengersWoTd <- exp(log(AirPassengers) - ce)
Run the code above in your browser using DataLab