X12A

<< Click to Display Table of Contents >>

Navigation:  Gekko User Manual > Gekko statements >

X12A

Previous pageReturn to chapter overviewNext page

The X12A (X12-arima) performs seasonal adjustment on quarterly or monthly data. The component uses a well-known external component developed by the US Census Bureau, and is similar to the AREMOS command with the same name. (It is considered to add X13-arima-seats and Tramo-Seats in Gekko, perhaps via the JDemetra+ project).

 


 

Syntax

 

x12a < period  PARAM=...  BANK=... >  variables ;

 

period

(Optional). If not stated, Gekko will use the global time period.

variables

Variables and/or list(s). Wildcards may be used.

PARAM=

(Optional). A text string containing parameter values for X12A. If a parameter string is not provided, Gekko will use 'save=(d10, d11, saa) mode=mult sigmalim=(1.50,2.50) seasonalma=msr force=totals' as default parameter. With the default parameter, if you are correcting the series y, the series y_saa is the result.

BANK=

(Optional). A databank name indicating where the timeseries are located.

 

If no period is given inside the <...> angle brackets, the global period is used (cf. TIME).

If a variable without databank indication is not found in the first-position databank, Gekko will look for it in other open databanks if databank search is active (cf. MODE).

Gekko appends the save=(...) types with underscore in the timeseries names, for instance y_saa for the saa type.

 

 


 

Example

 

You may try the following example:

 

reset;
option freq q;
time 2000q1 2009q2;
= 85.2, 87.2, 87.1, 87.2, 87.3, 90, 90.1, 90.4, 90.5, 92.4, 92.5, 94.7, 96.3, 98.5, 98.6, 98.5, 99.2, 99.8, 100.4, 100.5, 101.2,  102.3, 101.9, 101.7, 102.9, 103.5, 103.5, 103.5, 104.6, 104.5, 104.9, 104.9, 105.9, 106, 106, 106, 106.5, 106.7;
%= 'save=(d10, d11, saa) mode=mult sigmalim=(1.50,2.50) seasonalma=msr force=totals';
x12a <param = %p> y;  //the parameter could be omitted here, because the default parameter is identical
plot y, y_saa;

 

Result:

 

clip0032

Note the parameter save = (d10, d11, saa). You can choose between c17, d10, d11, d12, d13 and saa. The last one is only available if force=totals is set as parameter. Normally, the _saa series is considered the output of X12A.

 


 

Note

 

For much more information on X12-arima, see https://www.census.gov/ts/x12a/v03/x12adocV03.pdf from the US Census Bureau. See section 2.7 regarding program limits. It seems that there is a limit starting at around 60 years of data. For quarterly data, only up to 60 calendar years are supported. And for monthly data, only up to 59 years (708 months) are supported. To remedy this, you may split the period into overlapping sub-periods and use SPLICE to splice them.

 

Please note that all the parameters are located inside a text string.

 

If you need to inspect the results in more detail, please inspect the tempX12aFile... files in the temporary files folder (cf. the Gekko menu Help --> About...).

 

If you need more advanced seasonal correction, you may consider using the R interface (see R_RUN). R contains quite a lot of facilities for seasonal correction.

 

The example can be exactly reproduced in AREMOS with the following AREMOS command:

 

x12a y d10,d11,saa "mode=mult sigmalim=(1.50,2.50) seasonalma=msr force=totals print=alltables";

 

 


 

Related statements

 

COLLAPSE, SMOOTH