Chapter 28 Command Reference. Chapter Table of Contents TSVIEW COMMAND FORECAST COMMAND

Similar documents
APPENDIX 2 Customizing SAS/ASSIST Software

Chapter 3 Managing Results in Projects. Chapter Table of Contents

Data Representation. Variable Precision and Storage Information. Numeric Variables in the Alpha Environment CHAPTER 9

Chapter 28 Saving and Printing Tables. Chapter Table of Contents SAVING AND PRINTING TABLES AS OUTPUT OBJECTS OUTPUT OBJECTS...

Tasks Menu Reference. Introduction. Data Management APPENDIX 1

Introduction. LOCK Statement. CHAPTER 11 The LOCK Statement and the LOCK Command

Graphics. Chapter Overview CHAPTER 4

Permission Program. Support for Version 6 Only. Allowing SAS/SHARE Client Access to SAS Libraries or Files CHAPTER 40

Formats. Formats Under UNIX. HEXw. format. $HEXw. format. Details CHAPTER 11

Chapter 6 Creating Reports. Chapter Table of Contents

Using the SQL Editor. Overview CHAPTER 11

APPENDIX 4 Migrating from QMF to SAS/ ASSIST Software. Each of these steps can be executed independently.

Overview. CHAPTER 2 Using the SAS System and SAS/ ASSIST Software

Using Data Transfer Services

Chapter 2 User Interface Features. networks Window. Drawing Panel

Introduction to MDDBs

SAS Publishing. Configure SAS. Forecast Server 1.4. Stored Processes

Chapter 23 Animating Graphs. Chapter Table of Contents ANIMATING SELECTION OF OBSERVATIONS ANIMATING SELECTED GRAPHS...347

CHAPTER 13 Importing and Exporting External Data

Chapter 25 PROC PARETO Statement. Chapter Table of Contents. OVERVIEW SYNTAX SummaryofOptions DictionaryofOptions...

Using Cross-Environment Data Access (CEDA)

External Files. Definition CHAPTER 38

SAS Publishing SAS. Forecast Studio 1.4. User s Guide

CHAPTER 7 Using Other SAS Software Products

SAS Catalogs. Definition. Catalog Names. Parts of a Catalog Name CHAPTER 32

DBLOAD Procedure Reference

Choosing the Right Procedure

SAS File Management. Improving Performance CHAPTER 37

SAS. IT Service Level Management 2.1: Migration Documentation

Storing and Reusing Macros

Informats. Informats Under UNIX. HEXw. informat. $HEXw. informat. Details CHAPTER 13

Enterprise Miner Software: Changes and Enhancements, Release 4.1

SCL Arrays. Introduction. Declaring Arrays CHAPTER 4

Using MDP Extensions. What Is the Multidimensional Data Provider? CHAPTER 3

SAS/ASSIST Software Setup

10 The First Steps 4 Chapter 2

Macro Facility. About the Macro Facility. Automatic Macro Variables CHAPTER 14

SAS Web Infrastructure Kit 1.0. Overview

QUEST Procedure Reference

Chapter 27 Saving and Printing Graphics

SAS Forecast Server 3.1. Administrator s Guide to Report Administration Tasks

Chapter 25 Editing Windows. Chapter Table of Contents

Routing the SAS Log and SAS Procedure Output

Chapter 13 Multivariate Techniques. Chapter Table of Contents

The GTESTIT Procedure

Creating and Executing Stored Compiled DATA Step Programs

SAS Support for TELNET on Windows

SAS I/O Engines. Definition. Specifying a Different Engine. How Engines Work with SAS Files CHAPTER 36

Executing SAS/AF Applications

Examples That Use Remote Objecting

Introduction. CHAPTER 3 Working in the SAS Windowing Environment

Chapter 15 Mixed Models. Chapter Table of Contents. Introduction Split Plot Experiment Clustered Data References...

Using Dynamic Data Exchange

from the source host, use the FTP put command to copy a file from the source host to the target host.

Data Set Options. Specify a data set option in parentheses after a SAS data set name. To specify several data set options, separate them with spaces.

The EXPLODE Procedure

Chapter 14 Introduction to the FACTEX Procedure

SAS IT Resource Management Forecasting. Setup Specification Document. A SAS White Paper

Windows: SPX Access Method

Chapter 7 File Access. Chapter Table of Contents

CV2ODBC Procedure. Overview. CV2ODBC Procedure Syntax APPENDIX 4

Optimizing System Performance

Routing Output. Producing Output with SAS Software CHAPTER 6

OS/2: SPX Access Method

SAS Publishing. Upgrading from SAS. Forecast Server 1.2 to SAS Forecast Server 1.4

Batch Importing. Overview CHAPTER 4

Introduction. Understanding SAS/ACCESS Descriptor Files. CHAPTER 3 Defining SAS/ACCESS Descriptor Files

Alternative ODS HTML Statements for Running Examples in Different Operating Environments

The G4GRID Procedure. Introduction APPENDIX 1

SAS Data Libraries. Definition CHAPTER 26

Locking SAS Data Objects

SAS Workflow Manager 2.2: Administrator s Guide

Developing Custom Analytic Tasks for SAS Enterprise Guide Joe Carter, Stephen McDaniel, Mike Porter, SAS Institute Inc., Cary, NC

Licensing SAS DataFlux Products

Chapter 23 Introduction to the OPTEX Procedure

CHAPTER 7 Examples of Combining Compute Services and Data Transfer Services

The TIMEPLOT Procedure

Loading Data. Introduction. Understanding the Volume Grid CHAPTER 2

CREATING THE DISTRIBUTION ANALYSIS

CREATING THE ANALYSIS

Chapter 41 SAS/INSIGHT Statements. Chapter Table of Contents

Changes and Enhancements

Chapter 9 Selected Examples. Queues with Reneging

DATA Step Debugger APPENDIX 3

SAS Factory Miner 14.2: User s Guide

SYSTEM 2000 Essentials

SAS Component Language (SCL) Interface to Agent Services

Handling Exceptions. Introduction. Using the Program Halt Handler CHAPTER 10

SAS/ACCESS Data Set Options

Using SAS Files. Introduction CHAPTER 5

SAS Data Integration Studio 3.3. User s Guide

UNIX Spawner Program. Starting the UNIX Spawner Program CHAPTER 36

The correct bibliographic citation for this manual is as follows: SAS Institute Inc Proc EXPLODE. Cary, NC: SAS Institute Inc.

Introduction. Getting Started with the Macro Facility CHAPTER 1

The SERVER Procedure. Introduction. Syntax CHAPTER 8

The TRANTAB Procedure

SAS/FSP 9.2. Procedures Guide

Time Series Studio SAS User s Guide. SAS Documentation

OS/390 Platform Examples

The Time Series Forecasting System Charles Hallahan, Economic Research Service/USDA, Washington, DC

Transcription:

Chapter 28 Command Reference Chapter Table of Contents TSVIEW COMMAND...1353 FORECAST COMMAND...1353 1351

Part 3. General Information 1352

Chapter 28 Command Reference TSVIEW command The TSVIEW command invokes the Time Series Viewer. This is a component of the Time Series Forecasting System that can also be used as a stand-alone graphical viewer for any time series data set or view. See Time Series Viewer Window in Chapter 29, Window Reference, for more information. The command syntax is TSVIEW DATA= data set name VAR= time series variable name ID= time id variable name INTERVAL= interval name Examples If the TSVIEW command is issued without arguments, the Series Selection window appears to allow you to select an input data set and series. This is equivalent to selecting Time Series Viewer from the Analysis submenu of the Solutions pull-down menu. By specifying the DATA= and VAR= arguments, you can bringupthetime Series Viewer window directly. The ID= and INTERVAL= arguments are useful when the system cannot determine them automatically from the data. tsview data=sashelp.air var=air tsview data=dept.prod var=units id=period interval=qtr FORECAST command The FORECAST command invokes the Time Series Forecasting System. The syntax is FORECAST PROJECT= project name DATA= data set name VAR= time series variable name ID= time id variable name INTERVAL= interval name STAT= statistic CLIMIT= integer HORIZON= integer ENTRY= name 1353

Part 3. General Information OUT= data set name KEEP= argument DIAG= YES NO REFIT REEVAL If the FORECAST command is issued without arguments, the Time Series Forecasting window appears. This is equivalent to selecting Time Series Forecasting System from the Analysis submenu of the Solutions pulldown menu. Using the arguments, it is possible to do the following: Bring up the system with information already filled into some of the fields Bring up the system starting at a different window than the default Time Series Forecasting window Run the system in unattended mode so that a task such as creating a forecast data set is accomplished without any user interaction. By submitting such commands repeatedly from a SAS/AF or SAS/EIS application, it is possible to do simulated "batch" processing for many data sets or by-group processing for many subsets of a data set. You can create a project in unattended mode and later open it for inspection interactively. You can also create a project interactively in order to set options, fit a model, or edit the list of models, and then use this project later in unattended mode. A demo SAS/AF application is available. It is useful for running a batch of unattended forecasts using different series and/or data sets. To run it, issue the command AF C=SASHELP.FORCAST.FORCCMD.FRAME. Another interface to the FORECAST command is available using the Univariate Forecasting object in SAS/EIS software. PROJECT= project name Specifies the name of the SAS catalog entry in which forecasting models and other results will be stored and from which previously stored results are loaded into the forecasting system. DATA= data set name Specifies the name of the SAS data set containing the input data. VAR= time series variable name Specifies the series variable name. It must be a numeric variable contained in the data set. ID= time id variable name Specifies the time ID variable name for the data set. If the ID= option is not specified, the system will attempt to locate the variables named DATE, DATETIME, and TIME in the data set specified by the DATA= option. However, it is recommended that you specify the time ID variable whenever you are using the ENTRY= argument. 1354

Chapter 28. FORECAST command INTERVAL= interval name Specifies the time ID interval between observations in the data set. Commonly used intervals are year, semiyear, qtr, month, semimonth, week, weekday, day, hour, minute, andsecond. See Chapter 3, Date Intervals, Formats, and Functions, for information on more complex interval specifications. If the INTERVAL= option is not specified, the system will attempt to determine the interval based on the time ID variable. However, it is recommended that you specify the interval whenever you are using the ENTRY= argument. STAT= statistic Specifies the name of the goodness-of-fit statistic to be used as the model selection criterion. The default is RMSE. Valid names are sse mse rmse mae mape aic sbc rsquare adjrsq rwrsq arsq apc Sum of Square Error Mean Square Error Root Mean Square Error Mean Absolute Error Mean Absolute Percent Error Akaike Information Criterion Schwarz Bayesian Information Criterion R-Square Adjusted R-Square Random Walk R-Square Amemiya s Adjusted R-Square Amemiya s Prediction Criterion CLIMIT= integer An integer specifying the level of the confidence limits to be computed for the forecast. This integer represents a percentage; for example, 925 indicates 92.5% confidence limits. The default is 95, that is, 95% confidence limits. HORIZON= integer Specifies the number of periods into the future for which forecasts will be computed. The default is 12 periods. The maximum is 9999. ENTRY= name The name of an entry point into the system. Valid names are main devmod viewmod Starts the system at the Time Series Forecasting window (default). Starts the system at the Develop Models window. Starts the system at the Model Viewer window. Specify a project containing a forecasting model using the PROJECT= option. If a project containing a model is not specified, the message "No forecasting model to view" appears. 1355

Part 3. General Information viewser autofit forecast Starts the system at the Time Series Viewer window. Runs the system in unattended mode, fitting a forecasting model automatically and saving it in a project. If PROJECT= is not specified, the default project name SASUSER.FMSPROJ.PROJ is used. Runs the system in unattended mode to generate a forecast data set. The name of this data set is specified by the OUT= parameter. If OUT= is not specified, a window appears to prompt for the name and label of the output data set. If PROJECT= is not specified, the default project name SASUSER.FMSPROJ.PROJ is used. If the project does not exist or does not contain a forecasting model for the specified series, automatic model fitting is performed and the forecast is computed using the automatically selected model. If the project exists and contains a forecasting model for the specified series, the forecast is computed using this model. If the series covers a different time range than it did when the project was created, use the REFIT or REEVAL keyword to reset the time ranges. OUT= argument The one or two-level name of a SAS data set in which forecasts will be saved. Use in conjunction with ENTRY=FORECAST. If omitted, the system prompts for the name of the forecast data set. KEEP= argument Specifies the number of models to keep in the project when automatic model fitting is performed. This corresponds to Models to Keep in the Automatic Model Selection Options window. A value greater than 9 indicates that all models will be kept. The default is 1. DIAG= YES NO DIAG= YES causes the automatic model selection process to search only over those models that are consistent with the series diagnostics. DIAG= NO causes the automatic model selection process to search over all models in the selection list, without regard for the series diagnostics. This corresponds to Models to Fit in the Automatic Model Selection Options window. The default is YES. REFIT keyword Refits a previously saved forecasting model using the current fit range; the is, it reestimates the model parameters. Refitting also causes the model to be reevaluated (statistics of fit recomputed), and it causes the time ranges to be reset if the data range has changed (for example, if new observations have been added to the series). This keyword has no effect if you do not use the PROJECT= argument to reference an existing project containing a forecasting model. Use the REFIT keyword if you have added new data to the input series and you want to refit the forecasting model and update the forecast using the new time ranges. Be sure to use the same project, data set, and series names that you used previously. REEVAL keyword Re-evaluates a previously saved forecasting model using the current evaluation range; that is, it recomputes the statistics of fit. Re-evaluating also causes the time ranges 1356

Chapter 28. FORECAST command to be reset if the data range has changed (for example, if new observations have been added to the series). It does not refit the model parameters. This keyword has no effect if you also specify REFIT, or if you do not use the PROJECT= argument to reference an existing project containing a forecasting model. Use the REEVAL keyword if you have added new data to the input series and want to update your forecast using a previously fit forecasting model and the same project, data set, and series names that you used previously. Examples The following command brings up the Time Series Forecasting window with the data set name and series name filled in. The time ID variable is also filled in since the data set contains the variable DATE. The interval is filled in because the system recognizes that the observations are monthly. forecast data=sashelp.air var=air The following command brings up the Time Series Forecasting window with the project, data set name, series, time ID, and interval fields filled in, assuming that the project SAMPROJ was previously saved either interactively or using unattended mode as depicted below. Previously fit models will appear when the Develop Models or Manage Projects window is opened. forecast project=samproj The following command runs the system in unattended mode, fitting a model automatically, storing it in the project SAMPROJ in the default catalog SASUSER.FMSPROJ, and placing the forecasts in the data set WORK.SAMPOUT. forecast data=sashelp.workers var=electric id=date interval=month project=samproj entry=forecast out=sampout The following command assumes that a new month s data have been added to the data set from the previous example and that an updated forecast is needed using the previously fit model. Time ranges are automatically updated to include the new data since the REEVAL keyword is included. Substitute REFIT for REEVAL if you want the system to re-estimate the model parameters. forecast data=sashelp.workers var=electric id=date interval=month project=samproj entry=forecast out=sampout reeval The following command brings up the model viewer using the project created in the previous example and using 99 percent confidence limits in the forecast graph. forecast data=sashelp.workers var=electric id=date interval=month project=samproj entry=viewmod climit=99 1357

Part 3. General Information The final example illustrates using unattended mode with an existing project that has been defined interactively. In this example, the goal is to add a model to the model selection list, and to specify that all models in that list be fit and that all models which are fit successfully be retained. First bring up the Time Series Forecasting window and specify a new project name, WORKPROJ. Then select Develop Models, choosing SASHELP.WORKERS as the data set and MASONRY as the series. Now select Model Selection List from the Options pull-down menu. In the Model Selection List window, click Actions, thenadd, andthenarima Model. Define the model ARIMA(0,1,0)(0,1,0)s NOINT by setting the differencing value to 1 under both ARIMA Options and Seasonal ARIMA Options. Select OK to save the model and OK to close the Model Selection List window. Now select Automatic Fit from the Options pull-down menu. In the Automatic Model Selection Options window, select All autofit models in selection list in the Models to fit radio box, select All models from the Models to keep combo box, and then click OK to close the window. Select Save Project from the File pull-down menu, and then close the Develop Models window and the Time Series Forecasting window. You now have a project with a new model added to the selection list, options set for automatic model fitting, and one series selected but no models fit. Now enter the command: forecast data=sashelp.workers var=electric id=date interval=month project=workproj entry=forecast out=workforc The system runs in unattended mode to update the project and create the forecast data set WORKFORC. Check the messages in the Log window to find out if the run was successful and which model was selected for forecasting. To see the forecast data set, issue the command viewtable WORKFORC. To see the contents of the project, bring up the Time Series Forecasting window, open the project WORKPROJ, and select Manage Projects. You will see that the variable ELECTRIC was added to the project and has a forecasting model. Select this row in the table and then select List Models from the Tools pull-down menu. You will see that all of the models in the selection list which fit successfully are there, including the new model you added to the selection list. 1358

The correct bibliographic citation for this manual is as follows: SAS Institute Inc., SAS/ ETS User s Guide, Version 8, Cary, NC: SAS Institute Inc., 1999. 1546 pp. SAS/ETS User s Guide, Version 8 Copyright 1999 by SAS Institute Inc., Cary, NC, USA. ISBN 1 58025 489 6 All rights reserved. Printed in the United States of America. No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in any form or by any means, electronic, mechanical, photocopying, or otherwise, without the prior written permission of the publisher, SAS Institute Inc. U.S. Government Restricted Rights Notice. Use, duplication, or disclosure of the software by the government is subject to restrictions as set forth in FAR 52.227 19 Commercial Computer Software-Restricted Rights (June 1987). SAS Institute Inc., SAS Campus Drive, Cary, North Carolina 27513. 1st printing, October 1999 SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. indicates USA registration. Other brand and product names are registered trademarks or trademarks of their respective companies. The Institute is a private company devoted to the support and further development of its software and related services.