Loading...

seasonal 1.9: Accessing composite output

Avatar
Author
Christoph Sax

seasonal is an easy-to-use and full-featured R interface to X-13ARIMA-SEATS, the seasonal adjustment software developed by the United States Census Bureau. The latest CRAN version of seasonal fixes several bugs and makes it easier to access output from multiple objects. See here for a complete list of changes.

Illustration
Photo by Aaron Burden


seas() is the core function of the seasonal package. By default, seas() calls the automatic procedures of X-13ARIMA-SEATS to perform a seasonal adjustment that works well in most circumstances:

library(seasonal)
seas(AirPassengers)

For a more detailed introduction, read our article in the Journal of Statistical Software.

Multiple series adjustment

The previous version has introduced the adjustment of multiple series in a single call to seas(). This has removed the need for loops or lapply() in such cases and finally brought the composite spec to seasonal.

As Brian Monsell pointed out, this was not enough to access the output from the composite spec. The latest CRAN version fixes this problem.

Multiple adjustments can be performed by supplying multiple time series as an "mts" object:

library(seasonal)
m0 <- seas(cbind(fdeaths, mdeaths), x11 = "")
final(m0)

This performs two seasonal adjustments, one for fdeaths and one for mdeaths. The vignette on multiple adjustments describes how to specify options for individual series.

Accessing composite output

The composite argument is a list with an X-13 specification applied to the aggregated series:

m1 <- seas(
  cbind(mdeaths, fdeaths),
  composite = list(),
  series.comptype = "add"
)

With version 1.9 can now use out() to access the output of the composite spec:

out(m1)

We can also use series(), e.g., to access the final, indirectly adjusted series via the composite spec (see ?series for all available series):

series(m1, "composite.indseasadj")




More posts

EFS vs. NFS for RStudio on Kubernetes (AWS): Configuration and considerations

Patrick Schratz

Accessing Google's API via OAuth2

Patrick Schratz

seasonal 1.9: Accessing composite output

Christoph Sax

Google Season of Docs with R: useR! Information Board

Ben Ubah

Running old versions of TeXlive with tinytex

Kirill Müller

tsbox 0.3.1: extended functionality

Christoph Sax

Celebrating one-year anniversary as RStudio Full Service Certified Partner

Cosima Meyer, Patrick Schratz

Deprecating a pkgdown site served via GitHub Pages

Patrick Schratz, Kirill Müller

gfortran support for R on macOS

Patrick Schratz

Seasonal Adjustment of Multiple Series

Christoph Sax

Dynamic build matrix in GitHub Actions

Kirill Müller

Setting up a load-balanced Jitsi Meet instance

Patrick Schratz

DevOps Expert (f/m/d, 60-100%)

cynkra team

Maintaining multiple identities with Git

Kirill Müller

Relational data models in R

Angel D'az, Kirill Müller

tempdisagg: converting quarterly time series to daily

Christoph Sax

tsbox 0.2: supporting additional time series classes

Christoph Sax

DevOps System Engineer (40-60%)

cynkra team

Introducing dm: easy juggling of tables and relations

Balthasar Sager

tsbox 0.1: class-agnostic time series

Christoph Sax

Time series of the world, unite!

Christoph Sax

Done “Establishing DBI”!?

Kirill Müller


Other blogs

R-bloggers
Top