# X-13ARIMA-SEATS

X-13ARIMA-SEATS, successor to X-12-ARIMA and X-11, is a set of statistical methods for seasonal adjustment and other descriptive analysis of time series data that are implemented in the U.S. Census Bureau's software package. These methods are or have been used by Statistics Canada, Australian Bureau of Statistics, and the statistical offices of many other countries.
X-12-ARIMA can be used together with many statistical packages, such as SAS in its econometric and time series (ETS) package, R in its (seasonal) package, Gretl or EViews which provides a graphical user interface for X-12-ARIMA, and NumXL which avails X-12-ARIMA functionality in Microsoft Excel. There is also a version for MATLAB.
Notable statistical agencies presently using X-12-ARIMA for seasonal adjustment include Statistics Canada, the U.S. Bureau of Labor Statistics and Census and Statistics Department (Hong Kong). The Brazilian Institute of Geography and Statistics uses X-13-ARIMA.
X-12-ARIMA was the successor to X-11-ARIMA; the current version is X-13ARIMA-SEATS.
X-13-ARIMA-SEATS's source code can be found on the Census Bureau's website.

## Methods

The default method for seasonal adjustment is based on the X-11 algorithm. It is assumed that the observations in a time series, $Y_{t}$, can be decomposed additively,
    ${\begin{aligned}{\textit {Y}}_{t}&={T}_{t}+{S}_{t}+{I}_{t}\end{aligned}}$
or multiplicatively,
    ${\begin{aligned}{\textit {Y}}_{t}&={T}_{t}\times {S}_{t}\times {I}_{t}.\end{aligned}}$
In this decomposition, $T_{t}$ is the trend (or the "trend cycle" because it also includes cyclical movements such as business cycles) component, $S_{t}$ is the seasonal component, and $I_{t}$ is the irregular (or random) component. The goal is to estimate each of the three components and then remove the seasonal component from the time series, producing a seasonally adjusted time series.
The decomposition is accomplished through the iterative application of centered moving averages. For an additive decomposition of a monthly time series, for example, the algorithm follows the following pattern:
* An initial estimate of the trend is obtained by calculating centered moving averages for 13 observations (from $t-6$ to $t+6$).
* Subtract the initial estimate of the trend series from the original series, leaving the seasonal and irregular components (SI).
* Calculate an initial estimate of the seasonal component using a centered moving average of the SI series at seasonal frequencies, such as $t-24,t-12,t,t+12,t+24$
* Calculate an initial seasonally adjusted series by subtracting the initial seasonal component from the original series.
* Calculate another estimate of the trend using a different set of weights (known as "Henderson weights").
* Remove the trend again and calculate another estimate of the seasonal factor.
* Seasonally adjust the series again with the new seasonal factors.
* Calculate the final trend and irregular components from the seasonally adjusted series.
The method also includes a number of tests, diagnostics and other statistics for evaluating the quality of the seasonal adjustments.

## Copyright and conditions

The software is US government work, and those are in the public domain (in the US); for this software copyright has also been granted for other countries; the "User agrees to make a good faith effort to use the Software in a way that does not cause damage, harm, or embarrassment to the United States/Commerce."