Learn R Programming

seasonal (version 1.9.0)

series: Import X-13ARIMA-SEATS Output Tables

Description

With the exception of the composite spec, the series function imports all tables that can be saved in X-13ARIMA-SEATS.

Usage

series(x, series, reeval = TRUE, verbose = TRUE)

Value

depending on the table, either an object of class "ts" or "data.frame".

Arguments

x

an object of class "seas".

series

character vector, short or long names of an X-13ARIMA-SEATS table. If a long name is specified, it needs to be combined with the spec name and separated by a dot (it is not unique, otherwise. See list below.). More than one series can be specified (see examples).

reeval

logical, if TRUE, the model is re-evaluated with the corresponding specs enabled.

verbose

logical, if TRUE, a message is returned if a spec is added during reevaluation.

Details

If the save argument is not specified in the model call, series re-evaluates the call with the corresponding specs enabled (also returning a message). Note that re-evaluation doubles the overall computational time. If you want to accelerate the procedure, you have to be explicit about the output in the model call (see examples).

List of all importable tables from X-13ARIMA-SEATS:

speclong nameshort name
checkcheck.acfacf
checkcheck.acfsquaredac2
checkcheck.pacfpcf
compositecomposite.adjcompositesrsb1
compositecomposite.calendaradjcompositecac
compositecomposite.compositesrscms
compositecomposite.indadjsatotiaa
compositecomposite.indadjustfaciaf
compositecomposite.indaoutlieriao
compositecomposite.indcalendarica
compositecomposite.indirregulariir
compositecomposite.indlevelshiftils
compositecomposite.indmcdmovavgif1
compositecomposite.indmodirrie3
compositecomposite.indmodoriginalie1
compositecomposite.indmodsadjie2
compositecomposite.indrevsachangesi6a
compositecomposite.indrndsachangesi6r
compositecomposite.indrobustsaiee
compositecomposite.indsachangesie6
compositecomposite.indsadjroundirn
compositecomposite.indseasadjisa
compositecomposite.indseasonalisf
compositecomposite.indseasonaldiffisd
compositecomposite.indtotaladjustmentita
compositecomposite.indtrenditn
compositecomposite.indtrendchangesie7
compositecomposite.indunmodsiid8
compositecomposite.origchangesie5
compositecomposite.outlieradjcompositeoac
compositecomposite.prioradjcompositeia3
estimateestimate.armacmatrixacm
estimateestimate.iterationsitr
estimateestimate.regcmatrixrcm
estimateestimate.regressioneffectsref
estimateestimate.residualsrsd
estimateestimate.rootsrts
forceforce.forcefactorffc
forceforce.revsachangese6a
forceforce.rndsachangese6r
forceforce.saroundrnd
forceforce.seasadjtotsaa
forecastforecast.backcastsbct
forecastforecast.forecastsfct
forecastforecast.transformedftr
forecastforecast.transformedbcstbtr
forecastforecast.variancesfvr
historyhistory.chngestimatesche
historyhistory.chngrevisionschr
historyhistory.fcsterrorsfce
historyhistory.fcsthistoryfch
historyhistory.indsaestimatesiae
historyhistory.indsarevisionsiar
historyhistory.lkhdhistorylkh
historyhistory.outlierhistoryrot
historyhistory.saestimatessae
historyhistory.sarevisionssar
historyhistory.seatsmdlhistorysmh
historyhistory.sfestimatessfe
historyhistory.sfilterhistorysfh
historyhistory.sfrevisionssfr
historyhistory.trendchngestimatestce
historyhistory.trendchngrevisionstcr
historyhistory.trendestimatestre
historyhistory.trendrevisionstrr
identifyidentify.acfiac
identifyidentify.pacfipc
outlieroutlier.finaltestsfts
outlieroutlier.iterationsoit
regressionregression.aoutlierao
regressionregression.holidayhol
regressionregression.levelshiftls
regressionregression.outlierotl
regressionregression.regressionmatrixrmx
regressionregression.regseasonala10
regressionregression.seasonaloutlierso
regressionregression.temporarychangetc
regressionregression.tradingdaytd
regressionregression.transitorya13
regressionregression.userdefusr
seatsseats.adjustfacs16
seatsseats.adjustmentratios18
seatsseats.cyclecyc
seatsseats.diffseasonaladjdsa
seatsseats.difftrenddtr
seatsseats.irregulars13
seatsseats.longtermtrendltt
seatsseats.seasadjconstsec
seatsseats.seasonals10
seatsseats.seasonaladjs11
seatsseats.seasonaladjfcstdecompafd
seatsseats.seasonalfcstdecompsfd
seatsseats.seasonalsumssm
seatsseats.seriesfcstdecompofd
seatsseats.totaladjustmentsta
seatsseats.transitorys14
seatsseats.transitoryfcstdecompyfd
seatsseats.trends12
seatsseats.trendconststc
seatsseats.trendfcstdecomptfd
seriesseries.adjoriginalb1
seriesseries.calendaradjoriga18
seriesseries.outlieradjoriga19
seriesseries.seriesmvadjmv
seriesseries.spana1
seatsseats.componentmodelsmdc
seatsseats.filtersaconcfac
seatsseats.filtersasymfaf
seatsseats.filtertrendconcftc
seatsseats.filtertrendsymftf
seatsseats.squaredgainsaconcgac
seatsseats.squaredgainsasymgaf
seatsseats.squaredgaintrendconcgtc
seatsseats.squaredgaintrendsymgtf
seatsseats.timeshiftsaconctac
seatsseats.timeshifttrendconcttc
seatsseats.wkendfilterwkf
slidingspansslidingspans.chngspanschs
slidingspansslidingspans.indchngspanscis
slidingspansslidingspans.indsaspansais
slidingspansslidingspans.indsfspanssis
slidingspansslidingspans.indychngspansyis
slidingspansslidingspans.sfspanssfs
slidingspansslidingspans.tdspanstds
slidingspansslidingspans.ychngspansycs
spectrumspectrum.speccompositeis0
spectrumspectrum.specindirris2
spectrumspectrum.specindsais1
spectrumspectrum.specirrsp2
spectrumspectrum.specorigsp0
spectrumspectrum.specresidualspr
spectrumspectrum.specsasp1
spectrumspectrum.specseatsextresidualsser
spectrumspectrum.specseatsirrs2s
spectrumspectrum.specseatssas1s
transformtransform.permpriora2p
transformtransform.permprioradjusteda3p
transformtransform.permprioradjustedptda4p
transformtransform.priora2
transformtransform.prioradjusteda3
transformtransform.prioradjustedptda4d
transformtransform.seriesconstanta1c
transformtransform.temppriora2t
transformtransform.transformedtrn
x11x11.adjoriginalcc1
x11x11.adjoriginaldd1
x11x11.adjustdifffad
x11x11.adjustfacd16
x11x11.adjustmentratioe18
x11x11.biasfactorbcf
x11x11.calendard18
x11x11.calendaradjchangese8
x11x11.combholidaychl
x11x11.extremec20
x11x11.extremebb20
x11x11.irregulard13
x11x11.irregularadjaoira
x11x11.irregularbb13
x11x11.irregularcc13
x11x11.irrwtc17
x11x11.irrwtbb17
x11x11.mcdmovavgf1
x11x11.modirregulare3
x11x11.modoriginale1
x11x11.modseasadje2
x11x11.modsic4c4
x11x11.modsid4d4
x11x11.origchangese5
x11x11.replacsid9
x11x11.replacsic9c9
x11x11.robustsae11
x11x11.sachangese6
x11x11.seasadjd11
x11x11.seasadjb11b11
x11x11.seasadjb6b6
x11x11.seasadjc11c11
x11x11.seasadjc6c6
x11x11.seasadjconstsac
x11x11.seasadjd6d6
x11x11.seasonald10
x11x11.seasonaladjregseaars
x11x11.seasonalb10b10
x11x11.seasonalb5b5
x11x11.seasonalc10c10
x11x11.seasonalc5c5
x11x11.seasonald5d5
x11x11.seasonaldi_fsd
x11x11.sib3b3
x11x11.sib8b8
x11x11.tdadjorigc19
x11x11.tdadjorigbb19
x11x11.totaladjustmenttad
x11x11.trendd12
x11x11.trendadjlstal
x11x11.trendb2b2
x11x11.trendb7b7
x11x11.trendc2c2
x11x11.trendc7c7
x11x11.trendchangese7
x11x11.trendconsttac
x11x11.trendd2d2
x11x11.trendd7d7
x11x11.unmodsid8
x11x11.unmodsioxd8b
x11x11.yrtotalse4
x11regressionx11regression.calendarxca
x11regressionx11regression.calendarbbxc
x11regressionx11regression.combcalendarxcc
x11regressionx11regression.combcalendarbbcc
x11regressionx11regression.combtradingdayc18
x11regressionx11regression.combtradingdaybb18
x11regressionx11regression.extremevalc14
x11regressionx11regression.extremevalbb14
x11regressionx11regression.holidayxhl
x11regressionx11regression.holidaybbxh
x11regressionx11regression.outlieriterxoi
x11regressionx11regression.priortda4
x11regressionx11regression.tradingdayc16
x11regressionx11regression.tradingdaybb16
x11regressionx11regression.x11regc15
x11regressionx11regression.x11regbb15
x11regressionx11regression.xregressioncmatrixxrc
x11regressionx11regression.xregressionmatrixxrm

References

Vignette with a more detailed description: http://www.seasonal.website/seasonal.html

Comprehensive list of R examples from the X-13ARIMA-SEATS manual: http://www.seasonal.website/examples.html

Official X-13ARIMA-SEATS manual: https://www2.census.gov/software/x-13arima-seats/x13as/windows/documentation/docx13as.pdf

See Also

seas() for the main function.

Examples

Run this code

# \donttest{

m <- seas(AirPassengers)
series(m, "fct")  # re-evaluate with the forecast spec activated

# more than one series
series(m, c("rsd", "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.ychngspans")

# fundamental identities of seasonal adjustment
# Y = T * I * (S * TD)
all.equal(AirPassengers, series(m, "seats.trend") *
         series(m, "seats.irregular") * series(m, "seats.adjustfac"))
# Y_sa = Y / (S * TD)
all.equal(final(m), AirPassengers / series(m, "seats.adjustfac"))

### 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], t = "h")
lines(x13.pacf[,2])
lines(-x13.pacf[,2])
# R equivalent: pacf from stats
pacf(AirPassengers, lag.max = 35)

# use with composite (see vignette("multiple", "seasonal"))
m_composite <- seas(
  cbind(mdeaths, fdeaths),
  composite = list(),
  series.comptype = "add"
)
series(m_composite, "composite.indseasadj")
# }

Run the code above in your browser using DataLab