Skip Main Navigation Skip To Navigation Content

X-13ARIMA-SEATS Seasonal Adjustment Program

You are here: Census.govSubjects A to ZX-13ARIMA-SEATSX-13-Graph › User's Guide for the Windows Interface to X-13-Graph, Version 2.1
Skip top of page navigation

X-13-Graph Batch, Version 2.0: A SAS/GRAPH® Program for X-13ARIMA-SEATS Output
User's Guide for the Windows Interface to X-13-Graph, Version 2.1



Demetra Lytras, U.S. Census Bureau

May 22, 2012


1. Introduction

X-13-Graph Batch Version 2.0 is a SAS® program that creates graphs from X-13ARIMA-SEATS output. This interface is designed to make running the program easier by allowing the user to choose the graphs to create, tailor the appearance of the graphs, and save them in a variety of formats without having to know the specific variable name or graphics code that the actual SAS program uses.

Licensing information for this software can be found at http://www.census.gov/srd/www/disclaimer.html.

Return to contents.

2. Requirements and Installation

X-13-Graph Batch is a SAS program using SAS/GRAPH®. It requires SAS Version 8 or higher. The program also requires X-13ARIMA-SEATS or Version 0.2.8 or higher of X-12-ARIMA. No knowledge of SAS is required to use X-13-Graph.

SAS and SAS/GRAPH software are registered trademarks of the SAS Institute Inc. in the USA and other countries. ® indicates USA registration.

Users with older versions of Windows may need to install the Microsoft .NET Framework Version 2.0 Link to a non-federal Web site to use the interface. If it is not found on your computer, you will be prompted to download and install it when you attempt to install the interface.

To install the program, first unzip the file x13gbi.zip to your C:\ drive. The program will not work if saved to a network drive. This zip folder contains two files, the program executable x13GraphBatch.exe and its configuration file, x13GraphBatch.exe.config, as well as a subdirectory appl containing the necessary data sets and catalogs for the X-13-Graph SAS program to run. To start the program, double click on x13GraphBatch.exe.

Return to contents.

3. Running X-13ARIMA-SEATS in Graphics Mode

Before you can create any graphs with X-13-Graph, you must run X-13ARIMA-SEATS in graphics mode to produce the necessary output files. Running X-13ARIMA-SEATS in graphics mode creates graphics output files corresponding to the X-13ARIMA-SEATS options you specified in the input specifications (.spc) file. X-13ARIMA-SEATS also creates a graphics metafile, identified by the extension .gmt, which contains a list of all the graphics output files produced during the X-13ARIMA-SEATS run.

To run X-13ARIMA-SEATS in graphics mode from the command prompt, you must provide the name of an existing directory after the -g flag; X-13ARIMA-SEATS will store all graphics files in this specified directory. Because of output filename conflicts, this must be a different directory from where other output files are created. For example, when running X-13ARIMA-SEATS with the command

x13a bshors -g c:\x13a\graphics,

the graphics output files for the series bshors will be stored in the directory c:\x13a\graphics. (For more information, see Section 2.7 of the X-13ARIMA-SEATS Reference Manual.)

If you have an interface for X-13ARIMA-SEATS, make sure to select the option to run the program in graphics mode.

To obtain graphs for several different series from a single run of this batch program, you must specify the same graphics directory for each series.

Note: The SAS program uses the title statement from the X-13ARIMA-SEATS run to assign secondary titles to the graphs. This allows you to assign meaningful titles to the graphs within the X-13ARIMA-SEATS .spc file. If you are creating graphs for one series at a time, you can use the subtitle option to assign a subtitle to the graph.

Return to contents.

4. Using the X-13-Graph Batch Interface

4.1 Understanding the X-13-Graph Program

The X-13-Graph interface creates and edits the three text files which the X-13-Graph SAS program needs in order to run. These three files are the list of the series that will be graphed, the list of the graphs the program will create, and the X-13-Graph SAS program itself, which locates the necessary files, defines the graph and output options, and contains the commands to create the graphs.

The interface starts with a new program, set to default options. The minimum that you need to do to get graphs is to set the graphics directory, and create or choose a graphics project, as described in the next section. If your preferred graph options are not the default, you may want to set these options and save the program so you can later open the saved program and not have to choose your options each time.

Return to contents.

4.2 Create the Graphics Project

Program Options

The main window of the interface consists of a set of tabs that contain all the options that can be set for the program. The first tab asks you to choose the series to be graphed and the graphs to create. You choose these by creating or editing a graphics project. A graphics project is simply a pair of files located in the directory that holds your X-13ARIMA-SEATS graphics output. The first file is a list of the series to graph; the second is a list of the graphs to create.

To choose the graphics project, first enter the full path of the graphics directory into the text box, or click on the Browse button to choose the directory. The list box and buttons on this screen are disabled until a valid graphics directory is entered. A list of all the graphics projects in the directory will appear in the list box. You can select one of these, and click Choose series to graph and Choose graphs to create to create or edit the project. You also can add a new project by clicking Add New Project and providing a name for the project when you are prompted to do so. Selecting a project from the list and clicking Remove will remove it from the list and delete the project files from your computer.

Note: The X-13-Graph SAS program will not run until you have selected a project and chosen series and graphs for it. All other program options have a default setting, so after choosing these you can create your graphs.

Return to contents.

4.2.1 Choose the Series to Graph

View of Screen to Choose Series to Graph

You can add series to the project by selecting them using the mouse or the space bar from the left list box, marked "Choose series to graph," and pressing Add Selected Series. The series that have been added to the project will appear in the right list box, labeled "List of series to be graphed."

To create graphs that compare two series, select the two series together and press Compare Two Series. The two series will appear on the same line in the "List of series to be graphed" box. When the program is run, the requested graphs for comparing two series will be created for the pair, and all requested graphs meant for an individual series will be created for both of the graphs.

Remove series from the project by selecting them from the right list box and pressing Remove. If you don't want to remove a series from the project permanently, but do not want it to be graphed next time the program is run, you can select it from the right hand box and press Comment Out. A pound sign will appear in front of commented out items in the right list box.

When you have added all the desired series to the project, press Save Changes. A file with the name assigned to the project and an .mls extension will be saved to your graphics directory holding this list of series.

Return to contents.

4.2.2 Choose the Graphs to Create

View of Screen to Choose Graphs; Choosing graph type

Available graphs are listed by type in the drop down box at the top left. See Section 5 for a description of all available graphs. After you select the graph type, all the graph elements of that type appear in the list box below it, with three exceptions.

  1. If you choose Power Graphs, a box will appear asking for a value for the Box-Cox power lambda.
  2. If you choose Overlay Graphs for Comparing Two Series or Seasonal Overlay Graphs for Comparing Two Series, one list box will list the elements for the first series, and a second box will list the elements for the second series. See the descriptions of the graphs in Section 5 for more information.

View of Screen to Choose Graphs; Adding graphs

After you have selected the graph type, you can select the desired elements from the list box and add them to the project by clicking Plot selected elements. In most cases, you can select up to four elements to add at a time; for overlay graphs, you can choose only three. Also, in most cases selecting four elements and adding them together will create the same graphs as selecting and adding each item individually. (The SAS program will run more efficiently if you add them all together rather than individually, but in practice, there is not a noticeable difference in running time.) There are three exceptions:

  1. Overlay graphs for one series or for two. All elements selected together are plotted on one graph (note that in this case, the button to add the project reads Plot selected elements on one graph.)
  2. Component graphs (for one series only). All elements selected together are plotted individually, and then the individual graphs are compiled onto one page for easy comparison. Also, all graphs of the same type (that is, all factor graphs, all overlay graphs, all outlier graphs, etc.) are plotted on the same scale.
  3. SEATS Filter, Time Shift, and Squared Gain Graphs. All time shift elements selected together will be plotted on one graph, and all squared gain elements selected together will be plotted on one graph. Each filter graph will be plotted individually regardless of whether any other filter graph was also selected.

View of Screen to Choose Graphs; Removing Graphs

Graphs you have added to the project appear in the list boxes to the right. The default view is the "Full Names" view. Here you have the graph type on one line, and the full name of all the graphs listed after it. You can go to the "Output File" view tab to see the graph list as it will be written to disk when you save the project.

To remove graphs you have already added, select them from the list box on the right and press Remove. If you are viewing the graphs with the "Full Names" view, you can select the entire group by clicking on the graph type (e.g., overlay, spectrum, etc), or you can remove individual graph elements. If you are looking at the Output File view, you can only remove the entire group.

View of Screen to Choose Graphs; Commenting Out Graphs

If you do not want to delete a graph from the project, but do not want it to be graphed the next time the program runs, you can comment it out. To do this, select the graph from the "Output File" view and press Comment Out. A pound sign will appear before that graph group. You cannot comment out graphs from the Full Graph Names view.

Once you have added all the graphs, press Save Changes. A file with the name assigned to the project and the extension .gls will be written to the graphics directory with the list of graphs you have selected.

Return to contents.

4.3 Set Program Options

You can customize the appearance of the graphs with the options found on the next four tab pages on the Program Options screen. The options you choose will be applied to all graphs created for which that option is available.

4.3.1 Fonts and Labels

View of Fonts and Labels tab

Subtitles

The main title of each graph denotes what is being plotted; the graph's subtitle tells which series is being plotted. By default, the subtitle is the title given in the series spec of the X-13ARIMA-SEATS .spc file. If a title is not supplied, the default subtitle is the series name.

To specify a different subtitle, use the Series Title box. If you are creating overlay, component, history, or SI ratio graphs to compare two adjustments, use the Title of Comparison Series box to set the name of the second series. Quotation marks are not needed; they will appear in the graph's subtitle if they are used. Note that if you are running X-13-Graph to create plots for more than one series, this subtitle will be used for all series in the project.

Reference Gridlines

By default, the program automatically creates a reference line at the first month or quarter for each year. To move the reference lines to another month or quarter in order to highlight some particular month, change the value in the box asking you to Create reference gridlines at which period? For example, choosing "7: July" will put reference lines at July, if it is a monthly series. The color and style of this reference line can be changed using the Colors & Lines tab. A label will be added to the graph indicating which month or quarter the gridline represents unless footnotes are suppressed. Note that if the value of this box is set to "Default," the reference line will be at the first month or quarter but no label will be included; if the chosen value is "1: January or Quarter 1", then the label "Gridlines at January" or "Gridlines at Quarter 1" will be added to the graph.

Suppressing Footnotes and Labels

When the response to Print footnotes and labels? is "No", the program does not show footnotes for overlay, forecast, seasonal, spectrum, outlier t-value, or history graphs, and does not print axis labels for any graph.

Fonts

The font used for the title and subtitle can be changed using the Title Font box, and that of the labels and footnotes can be changed with the Label Font box. The interface offers a choice of five SAS fonts.

Note: When outputting graphs as pdf or PostScript, the Swiss font may not work well.

Font Size

The size of the text can be scaled by entering some percentage of the default size in the font size box. For example, entering 150 in the box will increase the size by 50%.

The labels in spectrum graphs, which note the median, range of visual significance, and significant seasonal and trading day frequencies, are controlled using the spectrum font size box. The size of these labels can be changed just as the font size is, by increasing or decreasing the default value of 100. You may have to experiment to find the best size for your graph, as these labels can change due to a variety of factors, including the device used to output the graph and the size of the graphing region.

Return to contents.

4.3.2 Colors and Lines

View of Colors and Line Types Tab

Up to six lines can be defined for creating the graphs. Line 1 is used for the first element of each graph, line 2 for the second, and so on. The color, type, and width of each line can be set using the Colors & Lines tab. The available colors and line types can be seen by clicking on the appropriate buttons to the left. Color and line type also can be set for the gridlines, and the color can be changed for all graph text; that is, for the titles, subtitles, labels, graph values, and footnotes. The box for needle width controls the width of the bars for ACF/PACF and spectrum graphs.

4.3.3 Axis Options

View of Axis Options Tab

Subspans

By default, the program graphs all available years of data. To see a shorter span of the series, change the subspan start and/or subspan end. Enter the year of the beginning of the desired subspan in the text box in the top row of boxes, and select the month or quarter from the drop down menu next to it. Choose the year and month (or quarter) of the end of the subspan in the second row. If a value is not set, or if the value selected is outside the span of the series, the program will default back to the original dates. You can specify only the start of the subspan, only the end, or both. Both a year and a period must be provided; the program has no default if only one is.

Y-Axis Formatting

The values on the y-axis can be changed in two ways: the range of values can be specified, and the values can be scaled by a requested divisor.

To change the range of the graph, a value must be supplied for both the minimum y-value and the maximum y-value in the appropriate boxes. If desired, a "By" value can be provided for incrementing the values. If the "By" value box is left blank, the program will create the increment automatically.

For example, if these variables are set to:

Minimum Y-Value: 2000
Maximum Y-Value: 8000
Y-Axis 'By' Value: 2000

then the y-axis will have tick marks at values 2000, 4000, 6000, and 8000. Note that if no tick mark created with the 'By' value falls exactly on the maximum y-value, then the maximum y-value will be the largest tick mark less than the specified value. That is, if the minimum is set to 2000, the maximum to 8000, and "By" to 2500, the y-axis will have tick marks at 2000, 4500, and 7000. The y-axis will not go to 8000.

To scale the y-axis by a divisor, change the value of the y-axis divisor. For example, if the data range from two million to six million, then setting this value to 1000000 will divide the y-variable by one million, so the y-axis will range from two to six. It will also create the label "In Millions" for that axis unless label printing is suppressed using the Fonts & Labels tab. If the y-divisor is not a power of ten, then the label will read "Units=ydivisor". This label will be printed sideways along the y-axis if the Angle of Label is set to "Vertical", and at the top of the y-axis if it is set to "Horizontal."

If both a change in the range and a change of scale are requested, then the values requested for the y-axis maximum and minimum should be in the original scale.

These options are available for most graphs. However, neither are available for component factor and outlier graphs, seasonal SI graphs, or outlier t-value graphs, and the y-divisor option is not available for any element on the log scale, spectrum graphs, seasonal graphs, and seasonal factor history graphs.

Return to contents.

4.3.4 Further Graph Options

View of Further Graph Options Tab

Noting Trend Uncertainty

When plotting the trend, you can emphasize the uncertainty of the last few trend estimates by plotting an "X" for a specified number of points.

Component Graph Formatting

When more than one element is requested for the component graphs, the program prints all the requested graphs on one page. If there are two elements, the graphs are printed with the second graph below the first. If there are four elements, the graphs are printed in two columns with two rows each. If there are three elements, the format used to print the graphs can be changed. By default, the program prints the graphs in one column with three rows, as such:

Component graph with three elements in the V3S format

This can be changed to printing the three graphs in two rows, with the first two graphs on top and the third below the first, as such:

Component graph with three elements in the default format

Graph Borders

By default, a border is printed surrounding each individual graph (see the boxes surrounding each of the three component graphs in the image above); this border can be suppressed.

Return to contents.

4.4 Set Output Options

4.4.1 View Graphs Onscreen

View of Output Options; Showing graphs onscreen

Choose "Show graphs on screen" in the Output Options tab to view all the graphs on screen without saving them.

You also can choose whether one, two, or three of the graphs are displayed on each page.

If you choose to view 2 or 3 graphs per page, then the intermediate graphs will not be included. The intermediate graphs are those graphs that are created so they can be used to create a composite graph. This final composite graph will be included. Intermediate graphs are found in the special seasonal SI ratio graphs, the first difference graphs for monthly series, and component graphs.

Note: All the graphs for one series print, then all the graphs for the next, and so on. If you specify two graphs to print per page, but ask for three graphs for each series, then the third graph for the first series will be on the same page as the first graph for the second series. You can change this only by running the program separately for each series.

Return to contents.

4.4.2 Save All Graphs to One File

View of Output Options; Saving graphs in one file

You can save all the graphs created in one run of X-13-Graph to a single PostScript or HTML file by selecting "Save all graphs in one file" in the Output Options tab. When you save graphs as HTML, all the graphs are saved as large GIF files located in the same directory as the HTML file, with the same base name as the HTML file. They are then compiled into one HTML file for easy viewing.

You can either save all the graphs in one file or save all the graphs of each series to its own file. If you choose to save all graphs in file, you can set the name of the PostScript or HTML file in the "Name of file created:" box. If you check the box to create a separate file for each series, the program will name the resulting file based on the name of the series. You must specify the directory to which to save the file in the box at the bottom of the screen.

X-13-Graph treats HTML output differently than PostScript output, as PostScript output is never overwritten. If you request that X-13-Graph save your graphs in the PostScript file c:\x13graph\MyGraphs.ps, and that file already exists, then the program will always append the new graphs to the end of the file. However, X-13-Graph will only append graphs to the end of an HTML file if the original file was written in the same SAS session. Therefore, if you specify that graphs be saved to the file c:\x13graph\MyGraphs.html, submit the program, and then change some program options and submit the program again, the graphs will be appended to the end of MyGraphs.html only if you did not close SAS after running the program the first time. If you did end the SAS session with which the original graphs were created, then the new program will overwrite the MyGraphs.html file.

You can choose whether one, two, or three graphs are saved per page, in the case of PostScript output, or to each individual GIF file, in the case of HTML output. You can choose to save the intermediate graphs used to create the final component, SI ratio, and monthly first difference graphs by checking the appropriate box.

Return to contents.

4.4.3 Save Each Graph Individually

View of Output Options; Saving each graph individually

You can save each graph as an image file in a variety of formats, including GIF, JPEG, and PDF, by selecting "Save Each Graph Individually." Choose the desired format from the drop down box.

Use the text box at the bottom of the screen to choose the directory to which to save the files. The saved files all have a base name with a number attached to the end. You can let the name of the series be the base name, or you can specify your own name in the box provided. Because these names do not let you easily distinguish one graph from another, a text file named GraphKey.txt is also created whenever the program is submitted. GraphKey.txt lists the series and graph title for each file.

Important: These image files and the GraphKey file are subject to being overwritten without warning. The X-13-Graph program will never overwrite graphs created in the same session of SAS; however, it can overwrite graphs produced in previous SAS sessions. For example, if you save the graph of the original series and the graph of the seasonally adjusted series to GIF files with the base name MyGraphs, then MyGraphs1.gif and MyGraphs2.gif will be produced. If you then edit the program so that only the last three years of data are plotted and resubmit the program, then MyGraphs3.gif and MyGraphs4.gif will be produced and the file information added to the end of GraphKey.txt if you did not close SAS between submitting the programs. If you did end the SAS session, or if you submitted the program in batch mode so that there is no active SAS session, then MyGraphs1.gif and MyGraphs2.gif will be overwritten with the new reduced span graphs.

It is possible to save two or three graphs to the file, by selecting either Two or Three where you are asked "How many graphs per file?" This option could be useful when you are comparing two graphs. While it is possible to put up to three graphs into any format, in many cases the graphs turn out to be illegible if you do so. In those cases, the option is marked as being Not Recommended. You can choose to save the intermediate graphs used to create the final component, SI ratio, and monthly first difference graphs by checking the appropriate box.

Return to contents.

4.4.4 Send Graphs to a Printer

View of Output Options; Sending graphs to a printer

You can send graphs directly to the printer without saving them by choosing "Send to printer." Graphs can be printed one, two, or three to a page. By default, they will print to the default SAS printer. You can change the SAS default printer for the current SAS session by using the Print Setup option in the File menu.

If you are running the program in batch mode and do not have the option of changing the default printer in SAS, you can change the printer by unchecking the box for the default printer and entering the printer device name in the text box. Printer device names depend on the printer used. For example, the SAS device name for a LaserJet 5SI PostScript printer is LJ5SIPS.

To see a list of available SAS devices:

  1. Start a SAS session and go to the command line. This is the text entry area on the tool bar, usually at the left side. Enter the command dir sashelp to bring up the Directory Window.
  2. Double click on the catalog called DEVICES. This brings up a list of all the SAS devices available for your version of SAS.

Return to contents.

4.5 Run the Program

After the program has been created, the X-13-Graph program can be run in SAS by clicking the Run X-13-Graph SAS Program button. By default, the program will start a new SAS session, if one is not already running, and submit the program. This default action can be changed by choosing "Running SAS" in the Options menu. A window will appear asking whether the program should be opened, submitted, or batch submitted.

  • Opening the program with SAS or the SAS Viewer will start SAS or the SAS Viewer if they are not open and will display the X-13-Graph program, but will not run it. Note that you must close any previous version of the X-13-Graph program already open before attempting to re-open the file, or any changes you have made to the program will not be displayed.
  • Submitting the program starts a SAS session if there is not one already running, and runs the X-13-Graph program. SAS stays open after the program has finished running. This is important if you are running SAS multiple times with different options and saving the graphs created. As long as SAS stays open, the graphs created will receive a unique identifier, and will not be overwritten. Closing SAS before rerunning the program may overwrite the graphs. This is the default action.
  • Batch submitting the program initiates an invisible SAS session, runs the program, and ends the SAS session. This action is not recommended if you are running the program multiple times and saving the files, as the older graphs could be overwritten.

The chosen action will be applied for the rest of the X-13-Graph session, or until you change the option.

Return to contents.

4.6 Save the Program

To save the program with the current settings, choose "Save" or "Save As" from the File menu. Alternately, the interface will ask you if you want to save the program upon exiting. Programs must have a .sas extension.

Return to contents.

5. Available Graphs

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

5.1 Overlay Graphs

You can select from one to three different graphical elements to plot above a single axis on either the original or the log scale. The program superimposes the elements. The order in which the elements are selected determines the order of the names in the title and legend as well as the color and line used for each element.

If any of the elements requested do not exist for a series, then that graph will not be created. For example, if you request a graph of the outlier-adjusted series, the seasonally adjusted series, and the trend, and the series has no outliers and thus no outlier-adjusted series, then the entire graph will not be created, even though the other components do exist.

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

Return to contents.

5.2 Component Graphs

The component graphs are one of the two graph types for which adding each element separately results in a different graph than adding multiple elements together. You can add up to four different seasonal decomposition component elements to the graphics project at one time. If you choose more than one element, all components are graphed in reduced size on one page; see component graph formats for more information. If the elements 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.

If you are saving the graphs, you can choose whether to save the individual graphs as well as the final graph comparing all elements by checking the Save all intermediate graphs box. If you are displaying the graphs on screen, you can scroll up to see the larger graphs of each component individually.

Graph of Seasonal Factors

Return to contents.

5.3 Spectrum Graphs

Graphs of 10 times the log10 of the spectrum amplitudes are similar to those in the X-13ARIMA-SEATS .out file. 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 depend on the values set for Line 3 for the seasonal frequencies and Line 4 for the trading day frequencies. Also, the size of the labels inside the graph is controlled by the spectrum font size, not by the regular font size.

Spectrum Graph of the Prior-Adjusted Original Series

Return to contents.

5.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. Both types of seasonal graphs are due to Cleveland and Terpenning (1982). Boxplots of the irregular component by month or quarter are also available.

SI Ratios with Seasonal Factors by Month or Quarter

These graphs display the SI ratio, the replaced SI ratio, and the seasonal factor for each month. They can be viewed in two ways.

Selecting "SI Ratios (by Period)" will produce as many as sixteen graphs. Each month or quarter is plotted separately and displayed in its own graph; there are also graphs showing four of these plots on one page, and, with monthly series, a graph displaying all twelve of the plots. All plots are on their own scale. A bar is shown to the right of the plot to give an indication of comparative scale.

If you are saving the graphs, only the final graph with all months or quarters shown will be saved unless you request that the program save the intermediate graphs.

SI Ratios in a Monthly Series; Graph for One Month



SI Ratios in a Monthly Series; Graph for Four Months

Alternately, by selecting "All SI Ratios", all twelve months or four quarters will be plotted on the same graph. The details may not be as clear, but the graph better indicates the scale and range of the monthly values.

All SI Ratios

Seasonal Factors by Month or Quarter

The program graphs seasonal factors by calendar month or quarter. Each calendar period has a line drawn at the level of its factor mean.

Seasonal Factors by Month

Boxplots of the Irregular Component

The program produces side by side boxplots of the irregular for each month or quarter.

Boxplots of the Irregular Component by Month

Return to contents.

5.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-13ARIMA-SEATS 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 graph the series and the forecasts only on the original scale.

Original Series and Forecasts with Prediction Intervals

Return to contents.

5.6 History Graphs

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

To create these graphs, you must have run X-13ARIMA-SEATS with the appropriate option in the estimates statement of the history spec. Including the line estimates=(sadj sadjchng trend trendchng seasonal aic fcst) in the history spec will allow all history graphs to be created. The options sadjlags, trendlags, and fstep control how much information is available for the graphs. See the X-13ARIMA-SEATS documentation for a full description of these options.

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", you will get two graphs. The first is a graph of the initial and the final estimates of that value overlaid with the original series and the estimates from any other lags from which you requested history information when running X-13ARIMA-SEATS. The second contains only the final and initial estimates of the value.

Seasonal Adjustment Values History Graph

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

Percent Change Graphs

Three graphs are created when "Percent Changes in the Seasonal Adjustment Values" or "Percent Changes in the Trend Values" 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

Special Trend Graphs

If you request graphs for "All Trend Revisions," "Trend Revisions for the Ending Date," or "Trend Revisions over the Lag Interval," the program produces graphs that connect the estimates for trend from the lags requested when X-13ARIMA-SEATS 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

Concurrent Forecasts and Forecast Errors

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

Concurrent Forecasts

Return to contents.

5.7 Sliding Spans Graphs

The sliding spans diagnostic creates up to four overlapping subspans of your data, seasonally adjusts each subspan, and compares the resulting seasonally adjusted values. For X-13ARIMA-SEATS to produce this diagnostic, the slidingspans spec must be included in your spec file.

You can create four types of sliding spans graphs:

Sliding Spans of Seasonal Factors

The first is an overlay graph of the seasonal factors of each span; if the percent difference between the largest and smallest value is greater than the cutoff value, usually 3, this graph will also show dots indicating the maximum and minimum value.

Maximum Percent Differences of Seasonal Factors

Maximum Percent Differences of Seasonal Factors by Year

Maximum Percent Differences of Seasonal Factors by Month

You can also create a graph of these maximum percent differences chronologically, by year, or by month. A horizontal line depicting the cutoff value is also drawn on each graph.

These four graphs can be created for the seasonal factors (or seasonally adjusted value, depending on your transformation type), the month-to-month or quarter-to-quarter percent changes of the seasonally adjusted series, the indirect seasonal factors, and the indirect month-to-month or quarter-to-quarter percent changes.

Return to contents.

5.8 ACF/PACF Graphs

Graphs of the autocorrelation function (ACF) and the partial autocorrelation function (PACF) are available for both the residuals and for the original series, but only if the relevant spec was included when running X-13ARIMA-SEATS.

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

Plot of the autocorrelation function of the residuals

If you included the identify spec when you ran X-13ARIMA-SEATS, 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-13ARIMA-SEATS, 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

Return to contents.

5.9 Outlier T-Value Graphs

Outlier T-Value Graphs allow you to compare the maximum absolute t-values from the automatic outlier procedure. For an example of their use, please 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-13ARIMA-SEATS only looks for additive outliers (AO) and level shifts (LS). If you ask for graphs of the temporary changes (TC) without requesting them specifically in X-13ARIMA-SEATS, 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-13ARIMA-SEATS 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-13ARIMA-SEATS assigns a t-value of 0 to any identified outlier. That is, if X-13ARIMA-SEATS identifies a particular month, say August 1998, as an LS, then the August 1998 LS t value would be 0, although X-13ARIMA-SEATS 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.

There are two types of graphs you can produce. If you choose "Outlier T-Value Graphs," the actual value of the maximum absolute t value will be plotted, with the correct sign. If you choose "Absolute Value Outlier T-Value Graphs," the absolute value of the maximum absolute t-value will be plotted.

Outlier T Value Graph

Absolute Value Outlier T Value Graph

Return to contents.

5.10 First Difference Graphs

The program graphs the first differences of the selected element by period. The number on the graph is the last digit of the difference's year.

If the series is monthly, the differences of each month are plotted together with four months per graph, and then a graph of all twelve months together is produced. When saving the graphs, only this final graph will be saved unless you request that the program saves the intermediate graphs.

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

Return to contents.

5.11 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 program will not create these graphs if the span is over eighteen years. Use the Subspan option on the Axis Options tab to limit the years to be graphed.

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

Return to contents.

5.12 SEATS Filters, Time Shift, and Squared Gains Graphs

To graph the symmetric and concurrent seasonal adjustment and trend filters used in SEATS adjustments, along with the time shifts of the concurrent filters and the squared gains of the concurrent and symmetric filters, you must first run X-13ARIMA-SEATS with out = 0 or out = 2 in the seats spec.

graph of symmetric seasonal adjustment filter

Each graph of a symmetric or concurrent filter will be created on its own plot. However, any requests for time shift graphs appearing in the same group will be plotted together; similarly, any requests for squared gain graphs appearing in the same group will be plotted together:

graph of time shift of seasonally adjusted filter and trend filter

graph of squared gain of concurrent and symmetric trend filters

Return to contents.

5.13 SEATS Diagnostics Graphs

A graph of the fully differenced SEATS seasonal adjustment or SEATS trend, as well as a graph of the seasonal period length sums of the SEATS seasonal factors, can only be created if X-13ARIMA-SEATS was run with out = 0 or out = 2 in the seats spec.

graph of fully differenced SEATS seasonal adjustment

graph of seasonal period length sums of the seats seasonal factors

Return to contents.

5.14 Power Graphs

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

Power Graph of the Original Series with Lambda=0

Return to contents.

5.15 Overlay Graphs for Comparing Two Series

Overlay graphs of two series can be produced to compare the adjustments.

These overlay graphs need two different models to compare. When choosing the series to graph, you must select both series from the left list box, and click on Compare Two Series to add the two series to the project.

Up to three elements can be chosen for each series. The elements do not have to be the same for each series. Choose the elements for the first series from the top box. 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, choose them from the bottom box. Once all elements are selected for both series, click on Plot selected elements on one graph to add them to the project.

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

Return to contents.

5.16 Component Graphs for Comparing Two Series

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 adjustments are being compared, the two series must both be named on the same line in the graphics metafile list (the .mls file).

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

Return to contents.

5.17 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.

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. These graphs also require that X-13ARIMA-SEATS was run with the option fcst or aic, respectively, in the estimates argument of the history spec.

Differences of the Sum of Squared Forecast Errors

Percent Change in the Seasonal Adjustment

Return to contents.

5.18 Seasonal Overlay Graphs for Comparing Two Adjustments

These graphs show the seasonal factors by month for two adjustments. Choose the type of seasonal factor (seasonal factors, combined adjustment factors, indirect seasonal factors, or indirect combined adjustment factors) to plot for the first adjustment from the top list box, and the type of seasonal factor for the second adjustment from the bottom list box. If you want the same type of factor for both adjustments, you need only select the option from the top list box.

overlay graph of seasonal factors by month

Return to contents.

5.19 SI Ratio Graphs 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.

Replaced SI Ratios with the Original Value

5.20 Forecast Graphs for Comparing Two Adjustments

These graphs allow you to compare the forecasts from two models. Graphs can be created on the original or the transformed scale.

Forecast Graph to Compare Two Adjustments

Return to contents.

5.21 Spectrum Graphs for Comparing Two Adjustments

These graphs allow you to compare the spectrum plots from two different adjustments.

Spectrum Graph to Compare Two Adjustments

Return to contents.

6. Reporting Problems

Please report all problems or provide any feedback to Demetra Lytras either by email ( demetra.p.lytras@census.gov ) or telephone at (301) 763-7426, or to Kathy McDonald-Johnson by email (x12@census.gov ).

Return to contents.

7. Acknowledgements

The X-13-Graph SAS program was developed primarily by Catherine C. Hood. Brian Monsell wrote the base SAS code for reading in the X-13ARIMA-SEATS files and for the SI ratio graphs. Kathy McDonald-Johnson updated and corrected some early SAS code. Kellie C. Wills wrote the SAS code for many of the graphs. David Findley and Brian Monsell provided valuable suggestions for the design of the graphs and the documentation. Lawrence Malakhoff suggested improvements to the interface. Many thanks to everyone who gave us suggestions and participated in testing.

Return to contents.

8. References

Buszuwski, J.S. and S. Scott (1988), "On the Use of Intervention Analysis in Seasonal Adjustment," Proceedings of the Business and Economic Statistics Section, American Statistical Association, Alexandria, VA, 337-342.

Cleveland, W.S. and S.J. Devlin (1980), "Calendar Effects in Monthly Time Series: Detection by Spectrum Analysis and Graphical Methods," Journal of the American Statistical Association, 75, 487-496.

Cleveland, W.S. and I. Terpenning (1982), "Graphical Methods for Seasonal Adjustment," Journal of the American Statistical Association, 77, 52-72.

Findley, D.F. (1990), "Making Difficult Model Comparisons Graphically," Proceedings of the Section on Survey Research Methods, American Statistical Association, Alexandria, VA.

Findley, D.F. (1991), "Model Selection for Multi-Step-Ahead Forecasting," Proceedings of the Business and Economic Statistics Section, American Statistical Association, Alexandria, VA.

Findley, D.F., B.C. Monsell, W.R. Bell, M.C. Otto and B.-C. Chen (1998). "New Capabilities and Methods of the X-12-ARIMA Seasonal Adjustment Program," Journal of Business and Economic Statistics, 16, 127-177 (with discussion).

McDonald-Johnson, K. and C.C. Hood (2001), "Outlier Selection for RegARIMA Models," Proceedings of the Business and Economic Statistics Section, American Statistical Association, Alexandria, VA.

Scott, S. (1987), "On the Impact of Outliers on Seasonal Adjustment," Proceedings of the Business and Economic Statistics Section, American Statistical Association, Alexandria, VA, 469-474.

Return to contents.


Source: U.S. Census Bureau | OSMREP and CSRM | (301) 763-1649 (or x12@census.gov) |  Last Revised: December 18, 2013