U.S. Department of Commerce

X-12-ARIMA

You are here: Census.govSubjects A to ZX-12-ARIMAX-12-GraphX-12-Graph Batch Documentation › Section 4
Skip top of page navigation

X-12-Graph: A SAS/GRAPH® Program for X-12-ARIMA Output
User's Guide for the Batch Program on the PC or Unix, Version 1.6



Demetra Lytras, U.S. Census Bureau

Primary Developer: Catherine C. Harvill Hood

January 13, 2011


4: Details of Graphs Available in X-12-Graph Batch

The current version of the program can produce the following types of graphs for each series: overlay graphs, spectrum graphs, component graphs, special seasonal factor graphs, forecast graphs, history graphs, ACF/PACF graphs, outlier t-value graphs, first difference graphs, year on year graphs, power graphs. It can also produce overlay graphs, component graphs, history graphs, and rsi graphs for comparing two adjustments.

4.1: Overlay Graphs

You can select from one to three different graphical elements to plot above a single axis. The program superimposes the elements. The order in which the elements are listed determines the order of the names in the title and legend and also the color and line used for each element. The keyword for overlay graphs is overlay.

If any of the elements requested does not exist for a series, then that graph will not be created. For example, if the statement

overlay: oadori trn sa

is in the .gls file, and the series has no outliers, and thus no outlier-adjusted series, then the entire graph will not be created, even if the seasonally adjusted series and the trend component exist.

Note: For overlay graphs, choose series on the same scale, i.e., do not choose elements on the original scale and the log scale. If elements on the original scale and the log scale are requested, the graph will not be created.

Overlay graph of the Original Series and the Trend of Midwest Housing Starts

Available Elements for Overlay Graphs
Element Element Code
Original or Composite Series ori
Calendar-Adjusted Original Series cad
Original Data with Preliminary Adjustments priadj
Original Series Modified for Extremes mori
Original Series with Replaced Missing Values mvadj
Original Series Showing Additive Outlier Adjustments oriao
Outlier Adjusted Original or Composite Series oadori
Prior Adjusted Original Series adjori
Seasonally Adjusted Series sa
Seasonally Adjusted Series with Annual Totals satot
Seasonally Adjusted Series Modified for Extremes msa
Trend trn
Indirect Seasonal Adjustment indsa
Indirect Seasonally Adjusted Series with Annual Total indsat
Original Modified for Extremes from Indirect indmor
Seasonally Adjusted Series Modified for Extremes from Indirect indmsa
Composite Series Adjusted by Prior Factors cmppadj
Indirect Trend indtrn
Log of Original (or Composite) Series lori
Log of Calendar-Adjusted Original Series lcad
Log of Original Data with Preliminary Adjustments lpriadj
Log of Original Series Modified for Extremes lmori
Log of Original Series Showing AO Adjustments loriao
Log of Original with Replaced Missing Values lmvadj
Log of Outlier Adjusted original (or Composite) loadori
Log of Prior Adjusted Original Series ladjori
Log of Seasonally Adjusted lsa
Log of Seasonally Adjusted Series Modified for Extremes lmsa
Log of Seasonally Adjusted with Annual Totals lsatot
Log of Trend ltrn
Log of Indirect Seasonal Adjustment lindsa
Log of Indirect Seasonally Adjusted Series with Annual Total lindsat
Log of Indirect Trend lindtrn
Log of Original Modified for Extremes from Indirect lindmor
Log of Seasonally Adjusted Series Modified for Extremes from Indirect lindmsa
Log of Composite Series Adjusted by Prior Factors lpacmp

Return to contents.

4.2: Spectrum Graphs

Graphs of 10 times the log10 of the spectrum amplitudes are similar to those in the X-12-ARIMA .out file. The keyword for spectrum graphs is spectrum.

Vertical lines identify the amplitudes at seasonal and trading day frequencies. Cleveland and Devlin (1980) identified the trading day frequencies of this graph as the frequencies most likely to have spectral peaks if a flow series has a trading day component. Note that the color and line type of these reference lines are not controlled with the colorg and ltypeg options, but rather seasonal frequencies use the color2 and ltype2 variables, while trading day frequencies use the color3 and ltype3 variables.

Spectrum Graph of the Original Series

Available Elements for Spectrum Graphs
Element Element Code
Spectrum of the Original Series spcori
Spectrum of the Seasonally Adjusted Series spcsa
Spectrum of the Modified Irregular spcirr
Spectrum of the RegARIMA Residuals spcrsd
Spectrum of the Original and Seasonally Adjusted Series (Overlaid) spcosa
Spectrum of the Indirect Modified Irregular spciir
Spectrum of Indirect Seasonally Adjusted Series spcisa

Return to contents.

4.3: Component Graphs

Component graphs allow you to select from one to four different seasonal decomposition component elements to plot. If you choose more than one, all components are graphed in reduced size on one page. See component graph formats for more information. You can scroll up to see the larger graphs of each component individually. If the selected graphs are of the same type- that is, outlier graphs, or factor graphs- then the graphs will have the same y-axis scale for easy comparisons. The keyword for component graphs is cmpnent.

Graph of Seasonal Factors

Available Elements for Factor Component Graphs
Element Element Code
Combined Holiday and TD Factors
cal
Combined Holiday and TD Factors (from X11regression) ccal
Combined Seasonal and TD Factors
caf
Final Adjustment Ratios arat
Holiday Factors hol
Indirect Adjustment Ratios indarat
Indirect Combined Seasonal and TD Factors indcaf
Indirect Irregular indirr
Indirect Seasonal Factors indsf
Irregular irr
Irregular Component Modified for Extremes mirr
Irregular Modifed for Extremes from Indirect indmirr
Prior Adjustment Factors prior
Seasonal Factors sf
Seasonal Factors with User-Defined Regressors sfr
Trading Day Factors td
Total Adjustment Factors totadj
User-defined Regression Factors usrdef
User-defined Seasonal Regression Factors rgseas
X-11 Easter Factors xeastr

Available Elements for Overlay Component Graphs
Element Element Code
Original (or Composite) Series ori
Calendar-Adjusted Original Series cad
Composite Series Adjusted by Prior Factors cmppadj
Original Data with Preliminary Adjustments priadj
Original Series Modified for Extremes mori
Original Series with Replaced Missing Values mvadj
Outlier Adjusted Original (or Composite) Series oadori
Prior Adjusted Original Series adjori
Seasonally Adjusted Series sa
Seasonally Adjusted Series with Annual Totals satot
Seasonally Adjusted Series Modified for Extremes msa
Trend trn
Indirect Seasonal Adjustment indsa
Indirect Seasonal Adjustment with Annual Total indsat
Indirect Trend indtrn
Original Modified for Extremes from Indirect indmor
Seasonally Adjusted Series Modified for Extremes from Indirect indmsa

Available Elements for Overlay Logs Component Graphs
Element Element Code
Log of Original (or Composite) Series lori
Log of Original with Replaced Missing Values lmvadj
Log of Outlier Adjusted Original (or Composite) loadori
Log of Prior Adjusted Original Series ladjori
Log of Seasonally Adjusted Series lsa
Log of Trend ltrn

Available Elements for Outlier Component Graphs
Element Element Code
Additive Outlier Factors ao
Combined Outliers otl
Level Shifts ls
Temporary Change Outliers tc
Indirect Additive Outlier Adjustment Factors indao
Indirect Level Shift Adjustment Factors indls

Available Elements for Outlier Logs Component Graphs
Element Element Code
Log of Additive Outlier Factors lao
Log of Combined Outliers lotl
Log of Level Shifts lls
Log of Temporary Change Outliers ltc

Available Elements for Weight Component Graphs
Element Element Code
Irregular Weights irrwt

Return to contents.

4.4: Special Seasonal Factor Graphs

Three types of seasonal graphs are available: SI ratios (detrended series values) with seasonal factors by month or quarter, seasonal factors by month or quarter, and boxplots of the irregular component by month or quarter. The keyword for special seasonal factor graphs is seas.

Both SI ratio graphs and monthly seasonal factor graphs are due to Cleveland and Terpenning (1982).

SI Ratios with Seasonal Factors by Month or Quarter

When created with the element code si, the program produces as many as 16 graphs. There is one graph for each month or quarter, along with graphs with four months or quarters per page. With monthly series, there is also a graph of all 12 months on one page.

When the element code siall is used, the SI ratio plots for all twelve months or four quarters are graphed on one plot with the same scale.

SI Ratios in a Monthly Series; Graph for One Month

SI Ratios in a Monthly Series; Graph for Four Months

SI Ratios of all Months on One Plot

Seasonal Factors by Month or Quarter

The program graphs seasonal factors by calendar month or quarter. Each calendar period has a year axis drawn at the level of its factor mean. You can graph either the seasonal factors (X-12-ARIMA's D 10 table) or the combined factors, which are the seasonal, trading day, holiday, and user-defined factors combined (X-12-ARIMA's D 16 table).

Seasonal Factors by Month

Boxplots of the Irregular Component

You can create boxplots of the irregular component by month to compare the spread of the irregular component for each month.

Boxplot of the Irregular Component by Month

Available Elements for Special Seasonal Factor Graphs
Element Element Code
SI Ratios (Graphed with Replacement Values and Seasonal Factors) si
SI Ratios Plots on One Graphsiall
Seasonal Factors sf
Combined Seasonal Factorscaf
Indirect Seasonal Factors indsf
Indirect Combined Seasonal Factorsindcaf
Boxplots of the Irregular Componentirr
Boxplots of the Indirect Irregular Componentindirr

Return to contents.

4.5: Forecast Graphs

The program graphs the original series, the forecasts, and the confidence intervals for the forecasts. If you chose a transformation in the X-12-ARIMA run, you can choose to graph the series and forecasts on the original scale or the transformed scale. If the series does not have a transformation, you can only graph the series and the forecasts on the original scale. The keyword for the forecast graphs is forecast.

Forecast Graph with Confidence Interval

Available Elements for Forecast Graphs
Element Element Code
Original Series and Forecasts on the Original Scale fct
Original Series and Forecasts on the Transformed Scale ftr

Return to contents.

4.6: History Graphs

You can create graphs to study the revisions for the seasonal adjustment, seasonal factors, trend, and forecasts of a series. The keyword for history graphs is history1.

You can create the following four types of history graphs:

Overlay Graphs

If you request a graph of the "Seasonal Adjustment Values", "Indirect Seasonal Adjustment Values", or "Trend Values" (elements ahst, indahst, and trhst, respectively), you will get a graph of the initial and the final estimates of that value overlaid with the original series. If you requested additional history information at certain lags when running X-12-ARIMA, the graph will also include those estimates.

Seasonal Adjustment Values History Graph (element 'ahst')

Seasonal Factor Graphs

Graphs of the seasonal factor history plot the initial and the final seasonal factor estimates by calendar period. For each month or quarter, the final seasonal factors are plotted as a line and the initial seasonal factors as circles, and a year axis is drawn at the period's factor mean.

Seasonal Factor Values History Graph (element 'sfhst')

Percent Change Graphs

Three graphs are created when "Percent Changes in the Seasonal Adjustment Values" or "Percent Changes in the Trend Values" (elements csahst and ctrhst, respectively) are requested. Each graph plots two of the following for each observation: the percent change (from the previous observation) of the final estimate, the percent change of the initial estimate, and the percent change of the original series. Each is plotted as a circle or diamond, with a vertical line connecting them.

Percent Change in the Seasonal Adjustment Value, Graph One of Three (element 'csahst')

Special Trend Graphs

If you request graphs for "All Trend Revisions," "Trend Revisions for the Ending Date," or "Trend Revisions for the Ending Date," the program produces graphs that connect the estimates for trend from the lags requested when X-12-ARIMA was run. This shows the direction a trend was taking for a particular date. Each graph has a continuous line representing the final trend estimate. There is a shorter line connecting all the estimates for a particular date from the requested lags. That is, if lags 1, 2, 3, and 4 were requested, then for December 1999, the initial trend estimate is connected to the Lag 1 estimate from November, the Lag 2 estimate from October, the Lag 3 estimate from September, and the Lag 4 estimate from August to see where the trend was heading.

The graph "for the ending date" shows the trend lags only for the last date on the graph, while the graph "over the lag interval" shows trends from the end of the series back however many lags were requested, and the graph for "all trend revisions" shows the trend lags for all dates.

All Trend Revisions (element 'trnhst')

Concurrent Forecasts and Forecast Errors

Graphs for "Concurrent Forecasts" (element cfchst) plot the original series and the within-sample forecasts for the lags specified in the history spec. Graphs for "Concurrent Forecast Errors" (element cfehst) plot the difference between the original series and the within-sample forecasts for the specified lags.

Concurrent Forecasts (element 'cfchst')

Available Elements for History Graphs
Element Element Code
Seasonal Adjustment Values ahst
Indirect Seasonally Adjusted Values indahst
Trend Values trhst
Seasonal Factor Values sfhst
Percent Changes in the Seasonally Adjusted Values csahst
Percent Changes in the Trend Values ctrhst
All Trend Revisions trhall
Trend Revisions for the Ending Date trhend
Trend Revisions over the Lag Interval trhlag
Concurrent Forecasts cfchst
Concurrent Forecast Errors cfehst

Return to contents.

4.7: ACF/PACF Graphs

Graphs of the autocorrelation function and the partial autocorrelation function are available for both the residuals and for the original series, but only if the relevant spec was included when running X-12-ARIMA. Both types have the keyword acfpacf.

If you included the spec check when you ran X-12-ARIMA, you can create ACF and PACF plots of the residuals:

Plot of the autocorrelation function of the residuals

If you included the identify spec, you can create ACF and PACF plots from the original series. The program will create an ACF and a PACF graph for each combination of differencing and seasonal differencing that was given in the identify spec. That is, if you asked for nonseasonal differencing of 0 and 1 and seasonal differencing of 0 and 1 when you ran X-12-ARIMA, you will get eight graphs; the order of differencing is included in the subtitle:

Plot of the partial autocorrelation function when the nonseasonal and the seasonal differencing are both one

Available Elements for ACF/PACF Graphs
Element Element Code
ACF Plot (from Check Spec) acf
PACF Plot (from Check Spec) pacf
ACF of the Squared Residuals acf2
ACF and PACF Plots (from Identity Spec) idacf

Return to contents.

4.8: Outlier T-Value Graphs

Outlier T-Value Graphs allow you to compare the maximum absolute t-values from the automatic outlier procedure. There are two types of graphs you can produce; each has its own keyword.

We've been using the graphs for research into ways for finding regARIMA outliers, with only limited success. For more information, see McDonald-Johnson and Hood (2001).

Information for the Outlier T-Value graphs comes from the automatic outlier procedure from the final t-value table. By default, X-12-ARIMA only looks for additive outliers (AO) and level shifts (LS). If you ask for graphs of the temporary change (TC) outliers without requesting them specifically in X-12-ARIMA, you will get an error.

The t-value graphs will plot the maximum absolute t-values for each data point. That is, if for one particular month, say June 1989, X-12-ARIMA calculates an AO t-value of 3.1, an LS t-value of 2.2, and a TC t value of 2.7, at June 1989 the graph shows only the AO t-value at 3.1. Another helpful feature of the maximum absolute t-value plot is that X-12-ARIMA assigns a t-value of 0 to any identified outlier. That is, if X-12-ARIMA identifies a particular month, say August 1998, as an LS, then the August 1998 LS t-value would be 0, although X-12-ARIMA would calculate valid t-values for the AO and TC effects. The greater (in absolute value) of the AO and TC t-values would appear on the graph.

If you use the keyword tvalue, the actual value of the maximum absolute t-value will be plotted, with the correct sign. If you use the keyword abtvalue, the absolute value of the maximum absolute t-value will be plotted. The first graph below was created with the keyword tvalue, and the second with the keyword abtvalue. Both keywords use the same elements.

Outlier T-Value Graph Created Using the Keyword 'tvalue'

Outlier T-Value Graph Created Using the Keyword 'abtvalue'

Available Elements for T-Value Graphs
Element Element Code
T-Values for Additive Outliers ao
T-Values for Level Shifts ls
T-Values for Temporary Changes tc

Return to contents.

4.9: First Difference Graphs

The program graphs the first differences of the selected element by period. If the series is monthly, the differences of each month are plotted together with four months per graph; a graph of all twelve months together is also produced. The number on the graph is the last digit of the difference's year. The keyword for first difference graphs is fstdiff.

The form of the first difference graphs was developed by Stuart Scott at the Bureau of Labor Statistics where it has been used to detect outliers in the original time series. See Scott (1987) and Buszuwski and Scott (1988) for examples of using first difference graphs to identify different types of outliers.

First Difference Graph of the Original Series, Months January through April
First Difference Graph of the Original Series, All Months

Available Elements for First Difference Graphs
Element Element Code
Original Series ori
Calendar-Adjusted Original Series cad
Original Series Adjusted by Prior Factors priadj
Original Series Modified for Extremes mori
Original Series with Missing Values Replaced mvadj
Prior-Adjusted Original Series adjori
Seasonally Adjusted Series sa
Seasonally Adjusted Series Modified for Extremes msa
Trend Cycle trn
Composite Series Adjusted by Prior Factors pacmp
Indirect Seasonally Adjusted Series indsa
Seasonal Adjustment Modified for Extremes from Indirect indmsa
Indirect Trend indtrn
Original Series Modified for Extremes from Indirect indmori

Return to contents.

4.10: Year-on-Year Graphs

Year-on-Year graphs plot the requested element by year in order to look for seasonal patterns in the data. The keyword for these graphs is yronyr.

The program will not create these graphs if the span is over 18 years. Use the subspan option to limit the years to be graphed.

Year-on-Year Graph of the Seasonally Adjusted Series, Years 1984 through 1998

Available Elements for Year-on-Year Graphs
Element Element Code
Original Series ori
Calendar-Adjusted Original Series cad
Original Series Adjusted by Prior Factors priadj
Original Series Modified for Extremes mori
Original Series with Missing Values Replaced mvadj
Prior-Adjusted Original Series adjori
Seasonally Adjusted Series sa
Seasonally Adjusted Series Modified for Extremes msa
Trend Cycle trn
Composite Series Adjusted by Prior Factors pacmp
Indirect Seasonally Adjusted Series indsa
Seasonal Adjustment Modified for Extremes from Indirect indmsa
Indirect Trend indtrn
Original Series Modified for Extremes from Indirect indmori

Return to contents.

4.11: Power Graphs

Power graphs are plots of the original series with a Box-Cox power transformation applied. The keyword for these graphs is power. The elements for these graphs is the Box-Cox power lambda λ . Setting lambda λ = 1 will produce a graph of the original series; lambda λ = 0 produces a graph of the logged series.

Power Graph of the Original Series with Lambda=0

Return to contents.

4.12: Overlay Graphs for Comparing Two Series

Overlay graphs of two series can be produced to compare the adjustments. The keyword for these graphs is overlay2.

These overlay graphs need two different models to compare. Enter the names of the graphics metafiles for the two models on the same line in the graphics metafile list file (the .mls file). An example is given in the examples below.

Up to three elements can be chosen for each series. The elements do not have to be the same for each series. In the graphics list file (the .gls file), list the elements for the first series after the colon after overlay2. If the elements for the second series are the same as those for the first series, you do not need to enter anything else. If different elements are required for the second series, put another colon on the same line, and list the elements for the second series. So, to create a graph with the original series and the seasonally adjusted series of the first model and the seasonally adjusted series for the second series, put the line

overlay2: ori sa: sa

in the .gls file.

Overlay Graph Two Adjustments; the Original Series and the Seasonal Adjustment

The elements available for these graphs match those for overlay graphs.

Return to contents.

4.13: Component Graphs for Comparing Two Series

You can compare the components of two different adjustments using the keyword cmpnent2.

When you request a component graph to compare two series, the program creates two graphs: the plots of the component for each series on one page, and either the difference or the ratio between the values of that component for each series. The ratio is graphed when the element is either a factor or the irregular and the adjustment is multiplicative, and the difference is graphed otherwise.

As two models are being compared, the two series must both be named on the same line in the graphics metafile list (the .mls file). An example of this is in the examples below.

Holiday Factors of Two Different Adjustments
Ratio of the Holiday Factors for Two Different Adjustments

The elements available for these graphs are the same as those for component graphs.

Return to contents.

4.14: History Graphs for Comparing Two Adjustments

History graphs allow you to compare two models by looking at the AIC Differences History and the Sum of Squared Forecast Error Differences History. For the Sum of Squared Forecast Error Differences graph, the program superimposes all available forecast lags on a single graph. The keyword for history graphs is history2.

These history graphs are discussed in Findley, Monsell, Bell, Otto and Chen (1998) and are related to diagnostics presented in Findley (1990, 1991).

You can also create graphs of the Percent Changes in the Seasonally Adjusted Series or the Trend. Two graphs are created when these elements are requested. One plots the month-to-month change of the concurrent adjustment for both series, connected by a vertical line to highlight the difference. The second does the same for the final adjustment.

History graphs require graphics output from two different models to compare. You must enter the names of the graphics metafiles for the two different models for the history graph on the same line in the graphics metafile list file. An example graphics metafile list file (.mls) is given in the examples below.

Differences of the Sum of Squared Forecast Errors

Percent Change in the Seasonally Adjusted Series

Available Elements for History Graphs
Element Element Code
AIC aichst
Sum of Squared Forecast Errors fcthst
Percent Change in the Seasonally Adjusted Series csahst
Percent Change in the Trend ctrhst

Return to contents.

4.15: SI Ratios for Comparing Two Adjustments

These graphs allow you to compare two models by graphing the SI ratios (the detrended series), the SI ratios with the extreme values replaced, or the SI ratios with the replaced value and the original value. The keyword for these graphs is rsi2.

Replaced SI Ratios with the Original Value

Available Elements for SI Ratio Graphs
Element Element Code
SI Ratios si
RSI Ratios rsi
RSI Ratios with Original Value sirsi

Return to contents.

4.16: Forecast Graphs for Comparing Two Adjustments

You can compare the forecasts of two models using the keyword fcast2.

Forecast Comparison Graph

Available Elements for Forecast Comparison Graphs
Element Element Code
Original Series and Forecasts on Original Scalefct
Original Series and Forecasts on Transformed Scaleftr

Return to contents.

4.17: Spectrum Graphs for Comparing Two Adjustments

You can compare the spectrum plots of two models using the keyword spect2.

Spectrum Comparison Graph

Available Elements for Spectrum Comparison Graphs
Element Element Code
Spectrum of the Original Series spcori
Spectrum of the Seasonally Adjusted Series spcsa
Spectrum of the Irregular spcirr
Spectrum of the RegARIMA Residuals spcrsd
Spectrum of the Indirect Modified Irregular spciir
Spectrum of Indirect Seasonally Adjusted Series spcisa

Return to section contents

Back to X-12-Graph Documentation Table Of Contents
Back to X-12-Graph Home Page
Back to X-12-ARIMA Home Page.


This symbol Off Site indicates a link to a non-government web site. Our linking to these sites does not constitute an endorsement of any products, services or the information found on them. Once you link to another site you are subject to the policies of the new site.
Source: U.S. Census Bureau | OSMREP and CSRM | (301) 763-1649 (or x12@census.gov) |  Last Revised: March 10, 2011