Object Reference : Object View and Procedure Reference : Series
  
 
x13
Series Procs
Seasonally adjust series using the Census X-13 method.
Census X-13 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.x13(options) [@reg(regopts)] [@arima(arimaopts)] [@x11arima(x11arimaopts)] [@tramo(tramopts)] [@x11(x11opts)] [@seats(seatsopts)]
You should follow the x13 keyword with general options and optionally, specifications for regression (@reg), ARIMA (either manual (@arima), X-11 automatic (@x11arima), or TRAMO automatic (@tramo)), and seasonal adjustment (either X-11 based (@x11) or SEATS based (@seats)) components.
When using X-13, EViews calls the X-13 executable written by the US Census. Many of the options available in the EViews x13 command closely mirror those available in the original X-13 executable. As such in the documentation of options that follows, we often make reference to the original Census documentation, which is included in PDF form with the rest of your EViews documentation.
You should note that while EViews does not offer direct support for the full set of Census X‑13, most of the specification statements allow you to directly add Census X-13 options using the extra option. For example, although EViews does not directly support the “constant” or “adjust” options of the X-13 Transformation spec (see Section 7.18 of the Census X-13 documentation), you may instruct Census X-13 to use those options by adding the option
tfextra=”constant adjust”
to your EViews X-13 command.
Specification Component Options
The regression, manual, X-11 or TRAMO automatic ARIMA, and X11 or SEATS based seasonal adjustment specification components,
[@reg(regopts)] [@arima(arimaopts)] [@x11arima(x11arimaopts)] [@tramo(tramopts)] [@x11(x11opts)] [@seats(seatsopts)]
each take various options. In this section, we outline the possible settings for each of these components.
Regression Specification (@reg)
Include exogenous variables in the ARIMA regression. If @arima, @x11arima, and @tramo specs are not included, a simple regression without ARIMA is performed. See Section 7.13 of the Census X-13 documentation for details.
 
 
 
X-13 Equivalent Option
REGS=list
Quoted, space delimited, list of X-13 built-in variables to use as regressors. For a full list of available variable types, see Table 7.27 of the X-13 documentation.
Variables=
USERREGS=list
Quoted, space delimited, list of series to include as user-variables in the regression. Each member of the list should be a valid series expression (e.g. “X” or “log(X)”).
User=
USERTYPES=list
Quoted, space delimited, list of user variable types.
The number of elements in the list must be the same as the number of elements in the “userregs” list, or should contain only one type, which will apply to all variables listed in “userregs”.
Types can be “constant” (constant), “seasonal” (seasonal), “td” (trading-day), “tdstock” (trading-day stock), “lom” (length of month), “loq” (length of quarter), “lpyear” (leap year), “easter” (Easter), “thanks” (Thanks-giving), “labor” (Labor day), “ao”, “ls”, “rp”, “so” or “tc” (outlier effects), “transitory” (SEATS transitory), “holiday1”, “holiday2”, “holiday3”, “holiday4” or “holiday5” (user-defined holidays), or “user” (none of the above).
Usertype=
AICTEST=list
Quoted, space delimited, list of variables to include in the AIC based variable selection routine.
Only certain variable types may be included in this list: “td”, “tdnolpyear”, “tdstock”, “td1coef”, “td1nolpyear”, “tdstock1coef”, “lom”, “loq”, “lpyear”, “easter”, “easterstock”, and “user”.
See Table 7.27 of the X-13 documentation for a description of these variables.
AICtest=
CHITEST
Perform a chi-squared test for inclusion of all user-defined holiday variables.
Chi2test=yes
REGEXTRA=list
A quoted, space delimited, list of any extra regression options included as part of X-13.
 
Manual ARIMA (@arima)
The @arima spec allows you to specify manually an ARIMA model to be used. Note that an @arima spec cannot be used at the same time as an @x11arima or @tramo spec. See Section 7.1 of the X-13 documentation for details.
 
 
 
X-13 Equivalent Option
model=text
Set the ARIMA model by specifying the model in standard “(p,d,q)(P,D,Q)” format. The text argument must be surrounded by quotes.
See the Census X-13 documentation for details on the syntax of text.
Model=
ar=list
Set the starting values for the AR parameters in the ARIMA model.
list should be a quoted, comma separated list of AR parameters. A blank space between commas may be used to use the default starting value for a parameter. To fix a parameter at its starting value, you may append the “f” character to the end of the parameter value (e.g., to fix a parameter at 0.7, use “0.7f”)
AR=
ma=list
Set the starting values for the MA parameters in the ARIMA model.
list should be a quoted, comma separated list of MA parameters. A blank space between commas may be used to use a default starting value for a parameter. To fix a parameter at its starting value, you may append the “f” character to the end of the parameter value (e.g., to fix a parameter at 0.7, use “0.7f”)
MA=
Automatic ARIMA Selection using X-11 (@x11arima)
Use X-11-ARIMA to automatically choose an ARIMA model. Note that an @x11arima spec cannot be used at the same time as an @arima or @tramo spec. See Section 7.12 of the Census X-13 documentation for more details.
 
 
 
X-13 Equivalent Option
MFILE=file
Specify a file on disk containing the list of possible ARIMA models to choose from. Note that this option cannot be used with the “max*” options.
 
See the Details portion of Section 7.12 of the Census X-13 documentation for details on how to create a valid ARIMA model file.
File=
MAXAR= integer
Set the maximum number of AR terms in models to be selected from. Cannot be used with the “mfile=” option.
 
MAXDIFF= integer
Set the maximum differencing order in models to be selected from. Cannot be used with the “mfile=” option.
 
MAXMA= integer
Set the maximum number of MA in models to be selected from. Cannot be used with the “mfile=” option.
 
MAXSAR= integer
Set the maximum number of seasonal AR terms in models to be selected from. Cannot be used with the “mfile=” option.
 
MAXSDIFF= integer
Set the maximum seasonal differencing order in models to be selected from. Cannot be used with the “mfile=” option.
 
MAXSMA=integer
Set the maximum number of seasonal MA in models to be selected from. Cannot be used with the “mfile=” option.
 
AMDL=F
Use only forecasts from the ARIMA model in model evaluation. Without this option, both forecasts and backcasts are used.
Mode=f
OUTSMPL
Use out of sample forecast errors during model evaluation
Outofsample=yes
BEST
Model selection tests all possible models and chooses the most likely. Without this option, the model selection routine will chose the first model that matches model selection criteria.
Method=best
FLIM= number
Sets the acceptance threshold for the within-sample forecast error test.
Fcstlim=
BLIM= number
Sets the acceptance threshold for the within-sample backcast error test. Only applies if the amdl=f option is not set.
Bcstlim=
X11AIMAEXTRA=list
A quoted, space delimited, list of any extra X-11 automatic ARIMA options included as part of X-13.
 
Automatic ARIMA selection using TRAMO (@tramo)
Use TRAMO to automatically choose an ARIMA model. Note that an @tramo spec cannot be used at the same time as an @arima or @x11arima spec. See Section 7.2 of the Census X-13 documentation for more details.
 
 
 
X-13 Equivalent Option
MAXORDER= “(int1, int2)”
Set the maximum order of AR, MA, SAR and SMA terms in candidate models. int1 sets the maximum for AR and MA terms, and int2 sets the maximum for seasonal AR and seasonal MA terms.
Maxorder=
MAXDIFF = “(int1, int2)”
Sets the maximum differencing and seasonal differencing in candidate models. int1 sets the maximum differencing, and int2 sets the maximum seasonal differencing.
Note the “maxdiff” option cannot be used along with the “diff” option.
Maxdiff=
DIFF = “(int1, int2)”
Set a fixed differencing for candidate models – i.e. differencing will not be automatically chosen. int1 sets differencing, and int2 sets seasonal differencing.
Note that the “diff” option cannot be used along with the “maxdiff” option.
Diff=
NOMIXED
Do not allow mixed (i.e. models with both AR and MA terms) amongst the candidate models.
Mixed=no
REJECTFCST
Test the out-of-sample forecast error of the final three years of data with the identified model to determine if forecast extension should be applied.
Rejectfcst=yes
FLIM=number
Sets the acceptance threshold for the within-sample forecast error test of the final identified model. Only applies if the “REJECTFCST” option is set.
Fcstlim=
LBQLIM=number
Acceptance criterion for confidence coefficient of the Ljung-Box Q statistic.
Ljungboxlimit=
ACCEPTDEF
Controls whether the default model is chosen if the Ljung-Box Q statistic for its model residuals is acceptable.
Acceptdefault =yes
NOMU
Do not check for significance of the constant term in candidate models
Checkmu=no
TRAMOEXTRA=list
A quoted, space delimited, list of any extra TRAMO automatic ARIMA options included as part of X-13.
 
X-11 Seasonal Adjustment (@x11)
Perform an X-11 based seasonal adjustment. Note that an @x11 spec cannot be included at the same time as an @seats spec. See Section 7.19 of the Census X-13 documentation for details.
 
 
 
X-13 Equivalent Option
MODE=arg
Sets the mode of seasonal adjustment decomposition: “mult” (multiplicative), “add” (additive), “pseudoadd” (pseudo-additive), or “logadd” (log-additive). The default is “mult”.
Mode=
TYPE=arg
Sets the type of seasonal adjustment: “sum” (summary), “trend”, or “sa” (default). See the Census X-13 documentation for a full description of each.
Type=
Filter=arg
Specifies the seasonal moving average filter to use: “s3x1” (3x1 moving average), “s3x3”, (3x3 moving average), “s3x5” (3x5 moving average), “s3x9” (3x9 moving average), “s3x15” (3x15 moving average), “stable” (Stable seasonal filter), “x11default” (3x3 followed by a 3x5), or “msr” (default).
You can set a different filter for each MA term by entering multiple values for key, separated by commas and surrounded in quotes (e.g., filter=”s3x1, s3x3, s3x9”).
Seasonalma=
Fcast
Append forecasted values to certain output series. See the Census X-13 documentation for a list of available series. This option must be used with the “flen=” general option.
appendfcst
bcast
Pre-pend backcasted values to certain output series. See the Census X-13 documentation for a list of available series. This option must be used with the “blen=” general option.
appendbcst
TRENDMA= integer
Length of the Henderson moving average to use. integer may be any odd integer between 1 and 101.
Trendma=
X11EXTRA=list
A quoted, space delimited, list of any extra X-11 seasonal adjustment options included as part of X-13.
 
SEATS Seasonal Adjustment (@seats spec)
Perform a SEATS based seasonal adjustment. Note that an @seats spec cannot be included at the same time as an @x11 spec. See Section 7.14 of the Census X-13 documentation for more details.
 
 
 
X-13 Equivalent Option
Fcast
Append forecasted values to certain output series. See the Census X-13 documentation for a list of available series. This option must be used with the “flen=” general option.
appendfcst
bcast
Prepend backcasted values to certain output series. See the Census X-13 documentation for a list of available series. This option must be used with the “blen=” general option.
appendbcst
Hp
Decompose the trend-cycle component into a long-term component using the Hodrick-Prescott filter.
Hpcycle=yes
Nostat
Do not accept any stationary seasonal ARIMA models, and convert the seasonal part to (0, 1, 1).
Statseas=no
Qmax=integer
Sets a limit for the Ljung-Box Q statistic, which is used to determine if the model provided to SEATS is of acceptable quality.
Qmax=
SEATSEXTRA=list
A quoted, space delimited, list of any extra SEATS seasonal adjustment options included as part of X-13.
 
Force Annual Totals (@force spec)
Force the annual totals of the adjusted series to match those of the original series. See Section 7.6 of the Census X-13 documentation for additional details.
 
 
 
X-13 Equivalent Option
type=arg
Change the forcing algorithm. Arg can be "denton" or "regress." Default is "denton."
type
mode=arg
Change the mode of the algorithm. Arg can be "ratio" or "diff." Default is "ratio."
mode
target=arg
Specify the target for matching the annual totals. Arg can be "cal" (Calendar Adjusted Series), "perm" (Original series adjusted for permanent prior adjustment factors), or "both." If this option is not used, the original series is used as the target.
target
round
Use rounded data for matching.
round
rho=val
Specify the value for rho.
rho
lambda=val
Specify the value for lambda.
lambda
Options
General Options
 
savespec=name
Save a copy of the X-13 spec file as a text object in the workfile. This can be useful as a template when making your own spec file to use with the “spec=” option.
save = list
Output series to save from the seasonal adjustment routine. list should be space delimited, in quotes, and contain the list of small identifiers from Table 7.46 (if doing X-11) or Table 7.30 (if doing SEATS) of the Census X-13 documentation. If this option is omitted, EViews will save the seasonally adjusted series (D11 for X-11, and S11 for SEATS).
errlog=name
Save a copy of the error log as a text object in the workfile. The error log will only be saved if the X-13 executable created an error message.
spec=name
User supplied X-13 spec file. Either a file on disk, or a text object in the workfile. Note that this option overrides all other options apart from “prompt”, “save”, “savespec” and “errlog”. Note you can use the “savespec” option to generate a spec file for editing. If your spec file contains a SERIES specification, EViews will use it. If it does not, EViews will generate one. In general we recommend letting EViews generate the SERIES part of your spec file.
prompt
Force dialog to show in program
p
Print output from the procedure.
Transformation Options:
Sets options for the transformation of data used. See the Transformation section, 7.18, of the Census X-13 documentation for more details.
 
tf=arg
Employ data transformation: “logit” (logistic), “auto” (choose between log or none), “log” (natural log), or number (where number is a Box-Cox power parameter. for the Box-Cox transformation).
tfextra=list
A quoted, space delimited, list of any extra transformation options included as part of X-13. The full set of possible options is provided in Section 7.18 of the X-13 documentation.
Automatic Outlier Options
Sets options for automatic outlier detection. Note that specific outliers can be included in the optional @reg spec. See the Outlier section, 7.11, of the Census X-13 documentation for more details.
 
 
 
X-13 Equivalent Option
OUTCRIT=arg
Value to which the absolute values of the outlier t-statistics are compared to detect outliers in automatic outlier detection.
Critical=
OUTLS=arg
Compute t-statistics to test the null hypotheses that each run of 2,..., outls successive level shifts cancel to form a temporary level shift.
Lsrun=
OUTALL
Sets the outlier detection method to all at once (as opposed to one at a time).
Method=addall
OUTTYPE=list
List of types of outliers to include in outlier detection (quoted and space delimited). Members of the list can include “ao” (additive outlier), “ls” (level shift), “tc” (temporary change), “so” (seasonal outliers).
You may use the special unquoted keyword “all” to include all types, as in “outtype=all”.
Types=
OUTSPAN=arg
Set the dates to search between. arg should be two dates, surrounded in quotes, of the format “YYYY.MON  YYYY.MON” (for monthly data) or “YYYY.Q  YYYY.Q” (for quarterly), where MON is a three letter month abbreviation, and Q is an integer representing the quarter.
Span=
OUTEXTRA=list
A quoted, space delimited, list of any extra outlier options included as part of X-13.
 
Estimation Options
Sets estimation options for the ARIMA/Regression estimation. Only relevant if a @reg, @arima, @x11arima, or a @tramo spec are included. See the Estimation section, 7.5, of the Census X-13 documentation for more details.
 
 
 
X-13 Equivalent Option
TOL=number
Set the convergence tolerance
Tol=
ITER=integer
Set the maximum number of iterations
Maxiter=
EXACT=arg
Specifies the use of an exact or a conditional likelihood for estimation:. “arma” (use exact likelihood for both AR and MA terms), “ma” (use conditional likelihood for AR and exact likelihood for MA terms), and “none” (use conditional likelihood for both sets of terms).
Exact=
ARIMASMPL=arg
Set the estimation sample. arg should be two dates, surrounded in quotes, of the format “YYYY.MON  YYYY.MON” (for monthly data) or “YYYY.Q  YYYY.Q” (for quarterly), where MON is a three letter month abbreviation, and Q is an integer representing the quarter.
Modelspan=
 
(in the SERIES spec, section 7.15).
ESTEXTRA=list
A quoted, space delimited, list of any extra estimation options included as part of X-13.
 
Forecast Options
Sets forecast options for the ARIMA/Regression estimation. Only relevant if a @reg, @arima, @x11arima, or a @tramo spec are included. See the Forecast section, 7.7, of the Census X-13 documentation for more details.
 
 
 
X-13 Equivalent Option
FLEN=integer
Length of forecast to perform. May be between 0 and 60. Note that if performing SEATS seasonal adjustment, the forecast length will be adjusted upwards to 2 years (24 months or 8 quarters).
Maxlead=
BLEN=integer
Length of backcast to perform. May be between 0 and 60.
Maxback=
FORCLOGNORM
Adjust forecasts to reflect that forecasts are generated from a log-normal distribution.
Lognormal
FORCEXTRA=list
A quoted, space delimited, list of any extra forecast options included as part of X-13.
 
Examples
As an example of using X-13, we will seasonally adjust some data obtained from FRED. The workfile, “X13 Macro.wf1” contains monthly non-seasonally adjusted US unemployment data from January 2005 to June 2012 in a series called UNRATENSA.
The command:
UNRATENSA.X13(save="d12 d10 d13 d11") @x11arima @x11
performs X-11 based seasonal adjustment using X-11-ARIMA to automatically select the ARIMA model, using the default set of candidate models. We save the final seasonally adjusted series (D11), the final trend series (D12), the final seasonal factors (D10), and the irregular component (D13) as series in the workfile.
The command:
UNRATENSA.X13(save="s12s10s13s11 afd", outtype="all", flen=24) @tramo(maxdiff="(2,1)", maxorder="(2,1)") @seats(fcast, seatsextra="signifsc=0.5")
Performs SEATS based seasonal adjustment, where TRAMO is used to automatically detect the best ARIMA model (with a maximum AR and MA order of 2, a maximum SAR and SMA order of 1, maximum differencing of 2, and a maximum seasonal differencing of 1), automatic outlier detection is included, with all types of outliers detected, and 24 periods of forecasted values are kept. Note that we use the seatsextra option to specify the non-included signifsc SEATS option. We save the final seasonally adjusted series (s11), the final trend series (s12), the final seasonal factors (s10), the irregular component (s13), and the forecasted seasonally adjusted values (afd) as series in the workfile.
Examples
See “Census X-13” for a discussion of the Census X-13 program. The full documentation for the Census program, X-13ARIMA-SEATS Reference Manual, can be found in the “docs” subdirectory of your EViews installation directory in the PDF file “X-13 Reference Manual.pdf”.
See also Series::seas, Series::x11, Series::x12, and Series::tramoseats.