seasonal-package: seasonal: R interface to X-13ARIMA-SEATS

Description Installation Setting the X-13 path manually Author(s) References See Also

Description

seasonal is an asy-to-use interface to X-13-ARIMA-SEATS, the seasonal adjustment software by the US Census Bureau. It offers full access to almost all options and outputs of X-13, including X-11 and SEATS, automatic ARIMA model search, outlier detection and support for user defined holiday variables, such as Chinese New Year or Indian Diwali. A graphical user interface can be used through the seasonalview package. Uses the X-13-binaries from the x13binary package.

The best way to start is to have a look at the vignette:

vignette("seas")

Installation

Seasonal depends on the x13binary package, which downloads and installs the X-13 binaries. To install both packages, simply type to the R console:

install.packages("seasonal")

A startup message is given if the path to X-13 is specified manually. To suppress the message, use suppressPackageStartupMessages().

Setting the X-13 path manually

Sometimes, you either cannot or don't want to rely on the binaries provided by x13binary:

Setting the path manually can be done as in previous versions of seasonal. In order to tell seasonal where to find the binary executables of X-13ARIMA- SEATS, the specific environmental variable X13_PATH needs to be set. This may be done during your active session in R:

Sys.setenv(X13_PATH = "YOUR_X13_DIRECTORY")

Exchange YOUR_X13_DIRECTORY with the path to your installation of X-13ARIMA- SEATS. You can always check your installation with:

checkX13()

If it works, you may want to set the environmental variable permanently, by adding the Sys.setenv line to one of your .Rprofile files. The easiest is to use the one located in your home directory, which can be written directly from R:

write('Sys.setenv(X13_PATH = "YOUR_X13_DIRECTORY")', file = "~/.Rprofile", append = TRUE)

If the file does not exist (by default), it will be created. Make sure that you get the quotes right: double quotes around your directory, single quotes around the whole Sys.setenv line, such that R understands your string. Check first that the the Sys.setenv line works correctly; once it is written you may have to edit .Rprofile manually. (Or add a second, overwriting line to it.) For other ways to set an environmental variable permanently in R, see Startup().

Author(s)

Christoph Sax christoph.sax@gmail.com

References

Sax C, Eddelbuettel D (2018). "Seasonal Adjustment by X-13ARIMA-SEATS in R." Journal of Statistical Software, 87(11), 1-17. doi: 10.18637/jss.v087.i11.

See Also

seas() for the core function and more information on package usage.


seasonal documentation built on Sept. 18, 2021, 5:06 p.m.