Object Reference : Object View and Procedure Reference : Series
  
 
x12
Seasonally adjust series using the Census X12 method.
x12 is available only for quarterly and monthly series. The procedure requires at least 3 full years of data and can adjust up to 600 observations (50 years of monthly data or 150 years of quarterly data).
Syntax
series_name.x12(options) base_name
Enter the name of the original series followed by a dot, the keyword, and a base name (no more than the maximum length of a series name minus 4) for the saved series. If you do not provide a base name, the original series name will be used as a base name. See the description in “save=” option below for the naming convention used to save series.
Options
Commonly Used Options
 
mode=arg (default=“m”)
Seasonal adjustment method: “m” (multiplicative adjustment; Series must take only non-negative values), “a” (additive adjustment), “p” (pseudo-additive adjustment), “l” (log-additive seasonal adjustment; Series must take only positive values).
filter=arg (default=“msr”)
Seasonal filter: “msr” (automatic, moving seasonality ratio), “x11” (X11 default), “stable” (stable), “s3x1” (3x1 moving average), “s3x3” (3x3 moving average), “s3x5” (3x5 moving average), “s3x9” (3x9 moving average), “s3x15” (3x15 moving average seasonal filter; Series must have at least 20 years of data).
save= “arg
Optionally saved series keyword enclosed in quotes. List the extension (given in Table 6-8, p.71 of the X12-ARIMA Reference Manual) for the series you want to save. The created series will use names of the form basename, followed by a series keyword specific suffix. Commonly used options and suffixes are: “"d10"” (final seasonal factors, saved with suffix “_sf”), “"d11"” (final seasonally adjusted series using “_sa”), “"d12"” (final trend-cycle component using “_tc”), “"d13"” (final irregular component using “_ir”).
All other options are named using the option symbol. For example “save="d16"” will store a series named basename_d16.
To save more than two series, separate the list with a space. For example, “save="d10 d12"” saves the seasonal factors and the trend-cycle series.
tf=arg
Transformation for regARIMA: “logit” (Logit transformation), “auto” (automatically choose between no transformation and log transformation), number (Box-Cox power transformation using specified parameter; use “tf=0” for log transformation).
sspan
Sliding spans stability analysis. Cannot be used along with the h option.
history
Historical record of seasonal adjustment revisions. Cannot be used along with the “sspan” option.
check
Check residuals of regARIMA.
outlier
Outlier analysis of regARIMA.
x11reg=arg
Regressors to model the irregular component in seasonal adjustment. Regressors must be chosen from the predefined list in Table 6-14, p. 88 of the X12-ARIMA Reference Manual. To specify more than one regressor, separate by a space within the double quotes.
reg=arg_list
Regressors for the regARIMA model. Regressors must be chosen from the predefined list in Table 6-17, pp. 100-101 of the X12-ARIMA Reference Manual. To specify more than one regressor, separate by a space within the double quotes.
arima=arg
ARIMA spec of the regARIMA model. Must follow the X12 ARIMA specification syntax. Cannot be used together with the amdl= option.
amdl=f
Automatically choose the ARIMA spec. Use forecasts from the chosen model in seasonal adjustment. Cannot be used together with the “arima=” option and must be used together with the “mfile=” option.
amdl=b
Automatically choose the ARIMA spec. Use forecasts and backcasts from the chosen model in seasonal adjustment. Cannot be used together with the arima= option and must be used together with the mfile= option.
best
Sets the method option of the auto model spec to best (default is first). Also sets the identify option of the auto model spec to all (default is first). Must be used together with the amdl=option.
modelsmpl=arg
Sets the subsample for fitting the ARIMA model. Either specify a sample object name or a sample range. The model sample must be a subsample of the current workfile sample and should not contain any breaks.
mfile=arg
Specifies the file name (include the extension, if any) that contains a list of ARIMA specifications to choose from. Must be used together with the amdl= option. The default is the X12A.MDL file provided by the Census.
outsmpl
Use out-of-sample forecasts for automatic model selection. Default is in-sample forecasts. Must be used together with the amdl= option.
plotspectra
Save graph of spectra for differenced seasonally adjusted series and outlier modified irregular series. The saved graph will be named GR_seriesname_SP.
prompt
Force the dialog to appear from within a program.
p
Print X12 procedure results.
Other Options
 
hma=integer
Specifies the Henderson moving average to estimate the final trend-cycle. The X12 default is automatically selected based on the data. To override this default, specify an odd integer between 1 and 101.
sigl=arg
Specifies the lower sigma limit used to downweight extreme irregulars in the seasonal adjustment. The default is 1.5 and you can specify any positive real number.
sigh=arg
Specifies the upper sigma limit used to downweight extreme irregulars in the seasonal adjustment. The default is 2.5 and you can specify any positive real number less than the lower sigma limit.
ea
Nonparametric Easter holiday adjustment (x11easter). Cannot be used together with the easter[w] regressor in the reg= or x11reg= options.
f
Appends forecasts up to one year to some optionally saved series. Forecasts are appended only to the following series specified in the “save=” option: “"b1"” (original series, adjusted for prior effects), “"d10"” (final seasonal factors), “"d16"” (combined seasonal and trading day factors).
flead=integer
Specifies the number of periods to forecast (to be used in the seasonal adjustment procedure). The default is one year and you can specify an integer up to 60.
fback=integer
Specifies the number of periods to backcast (to be used in the seasonal adjustment procedure). The default is 0 and you can specify an integer up to 60. No backcasts are produced for series more than 15 years long.
aicx11
Test (based on AIC) whether to retain the regressors specified in “x11reg=”. Must be used together with the x11reg= option.
aicreg
Test (based on AIC) whether to retain the regressors specified in “reg=”. Must be used together with the reg= option.
sfile=arg
Path/name (including extension, if any) of user provided specification file. The file must follow a specific format; see the discussion below.
User provided spec file
EViews provides most of the basic options available in the X12 program. For users who need to access the full set of options, we have provided the ability to pass your own X12 specification file from EViews. The advantage of using this method (as opposed to running the X12 program in DOS) is that EViews will automatically handle the data in the input and output series.
To provide your own specification file, specify the path/name of your file using the “sfile=” option in the x12 proc. Your specification file should follow the format of an X12 specification file as described in the X12-ARIMA Reference Manual, with the following exceptions:
the specification file should have neither a series spec nor a composite spec.
the x11 spec must include a save option for D11 (the final seasonally adjusted series) in addition to any other extensions you want to store. EViews will always look for D11, and will error if it is not found.
to read back data for a “save” option other than D11, you must include the “save=” option in the x12 proc. For example, to obtain the final trend-cycle series (D12) into EViews, you must have a “save=” option for D12 (and D11) in the x11 spec of your specification file and a “save=d12" option in the EViews x12 proc.
Note that when you use an “sfile=” option, EViews will ignore any other options in the x12 proc, except for the “save=” option.
Difference between the dialog and command line
The options corresponding to the Trading Day/Holiday and Outliers tab in the X12 dialog should be specified by listing the appropriate regressors in the “x11reg=” and “reg=” options.
Examples
The command:
sales.x12(mode=m,save="d10 d12") salesx12
seasonally adjusts the SALES series in multiplicative mode. The seasonal factors (d10) are stored as SALESX12_SF and the trend-cycles series is stored as SALESX12_TC.
sales.x12(tf=0,arima="(0 0 1)",reg="const td")
specifies a regARIMA model with a constant, trading day effect variables, and MA(1) using a log transformation. This command does not store any series.
freeze(x12out) sales.x12(tf=auto, amdl=f, mfile= "c:\eviews\mymdl.txt")
stores the output from X12 in a text object named X12OUT. The options specify an automatic transformation and an automatic model selection from the file “Mymdl.TXT”.
revenue.x12(tf=auto,sfile="c:\eviews\spec1.txt",save="d12 d13")
adjusts the series REVENUE using the options given in the “Spec1.TXT” file. Note the following: (1) the “tf=auto” option will be ignored (you should instead specify this option in your specification file) and (2) EViews will save two series REVENUE_TC and REVENUE_IR which will be filled with NAs unless you provided the “save=” option for D12 and D13 in your specification file.
freeze(x12out) sales.x12(tf=auto, amdl=f, mfile= "c:\eviews\mymdl.txt")
stores the output from X12 in the text object X12OUT. The options specify an automatic transformation and an automatic model selection from the file “Mymdl.TXT”. The seasonally adjusted series is stored as SALES_SA by default.
revenue.x12(tf=auto,sfile="c:\eviews\spec1.txt",save="d12 d13")
adjusts the series REVENUE using the options given in the “Spec1.TXT file. Note the following: (1) the “tf=auto” option will again be ignored (you should instead specify this in your specification file) and (2) EViews will error if you did not specify a “save=” option for D11, D12, and D13 in your specification file.
Cross-references
See “Census X12” for a discussion of the Census X12 program. The documentation for X12, X12-ARIMA Reference Manual, may be found in the “docs” subdirectory of your EViews directory, in the PDF files “Finalpt1.PDF and “Finalpt2.PDF.
See also Series::seas, Series::x11, Series::x13, and Series::tramoseats.