Contents
About
Credits and Acknowledgments
Credits
Documentation
Software
Technical Support
Acknowledgments
General Information
What’s New in SAS/ETS
What’s New in SAS/ETS for SAS 9.2
Overview
AUTOREG Procedure
COUNTREG Procedure
DATASOURCE Procedure
New ESM Procedure
MODEL Procedure
PANEL Procedure
QLIM Procedure
SASECRSP Engine
SASEFAME Engine
SASEHAVR Engine
New SIMILARITY Procedure (Experimental)
UCM Procedure
VARMAX Procedure
X12 Procedure
References
Introduction
Overview of SAS/ETS Software
Uses of SAS/ETS Software
Contents of SAS/ETS Software
Experimental Software
About This Book
Chapter Organization
Typographical Conventions
Where to Turn for More Information
Accessing the SAS/ETS Sample Library
Online Help System
SAS Short Courses
SAS Technical Support Services
Major Features of SAS/ETS Software
Discrete Choice and Qualitative and Limited Dependent Variable Analysis
Regression with Autocorrelated and Heteroscedastic Errors
Simultaneous Systems Linear Regression
Linear Systems Simulation
Polynomial Distributed Lag Regression
Nonlinear Systems Regression and Simulation
ARIMA (Box-Jenkins) and ARIMAX (Box-Tiao) Modeling and Forecasting
Vector Time Series Analysis
State Space Modeling and Forecasting
Spectral Analysis
Seasonal Adjustment
Structural Time Series Modeling and Forecasting
Time Series Cross-Sectional Regression Analysis
Automatic Time Series Forecasting
Time Series Interpolation and Frequency Conversion
Trend and Seasonal Analysis on Transaction Databases
Access to Financial and Economic Databases
Spreadsheet Calculations and Financial Report Generation
Loan Analysis, Comparison, and Amortization
Time Series Forecasting System
Investment Analysis System
ODS Graphics
Related SAS Software
Base SAS Software
SAS Forecast Studio
SAS High-Performance Forecasting
SAS/GRAPH Software
SAS/STAT Software
SAS/IML Software
SAS Stat Studio
SAS/OR Software
SAS/QC Software
MLE for User-Defined Likelihood Functions
JMPSoftware
SAS Enterprise Guide
SASAdd-In for Microsoft Office
SAS Enterprise MinerTM—Time Series Node
SAS Risk Products
References
Working with Time Series Data
Overview
Time Series and SAS Data Sets
Introduction
Reading a Simple Time Series
Dating Observations
SAS Date, Datetime, and Time Values
Reading Date and Datetime Values with Informats
Formatting Date and Datetime Values
The Variables DATE and DATETIME
Sorting by Time
Subsetting Data and Selecting Observations
Subsetting SAS Data Sets
Using the WHERE Statement with SAS Procedures
Using SAS Data Set Options
Storing Time Series in a SAS Data Set
Standard Form of a Time Series Data Set
Several Series with Different Ranges
Missing Values and Omitted Observations
Cross-Sectional Dimensions and BY Groups
Interleaved Time Series
Output Data Sets of SAS/ETS Procedures
Time Series Periodicity and Time Intervals
Specifying Time Intervals
Using Intervals with SAS/ETS Procedures
Time Intervals, the Time Series Forecasting System, and the Time Series Viewer
Plotting Time Series
Using the Time Series Viewer
Using PROC SGPLOT
Using PROC PLOT
Using PROC TIMEPLOT
Using PROC GPLOT
Calendar and Time Functions
Computing Dates from Calendar Variables
Computing Calendar Variables from Dates
Converting between Date, Datetime, and Time Values
Computing Datetime Values
Computing Calendar and Time Variables
Interval Functions INTNX and INTCK
Incrementing Dates by Intervals
Alignment of SAS Dates
Computing the Width of a Time Interval
Computing the Ceiling of an Interval
Counting Time Intervals
Checking Data Periodicity
Filling In Omitted Observations in a Time Series Data Set
Using Interval Functions for Calendar Calculations
Lags, Leads, Differences, and Summations
The LAG and DIF Functions
Multiperiod Lags and Higher-Order Differencing
Percent Change Calculations
Leading Series
Summing Series
Transforming Time Series
Log Transformation
Other Transformations
The EXPAND Procedure and Data Transformations
Manipulating Time Series Data Sets
Splitting and Merging Data Sets
Transposing Data Sets
Time Series Interpolation
Interpolating Missing Values
Interpolating to a Higher or Lower Frequency
Interpolating between Stocks and Flows, Levels and Rates
Reading Time Series Data
Reading a Simple List of Values
Reading Fully Described Time Series in Transposed Form
Date Intervals, Formats, and Functions
Overview
Time Intervals
Constructing Interval Names
Shifted Intervals
Beginning Dates and Datetimes of Intervals
Summary of Interval Types
Examples of Interval Specifications
Date and Datetime Informats
Date, Time, and Datetime Formats
Date Formats
Datetime and Time Formats
Alignment of SAS Dates
Date, Time, and Datetime Functions
SAS Date, Time, and Datetime Functions
References
SAS Macros and Functions
SAS Macros
BOXCOXAR Macro
DFPVALUE Macro
DFTEST Macro
LOGTEST Macro
Functions
PROBDF Function for Dickey-Fuller Tests
References
Nonlinear Optimization Methods
Overview
Options
Details of Optimization Algorithms
Overview
Choosing an Optimization Algorithm
Algorithm Descriptions
Remote Monitoring
ODS Table Names
References
Procedure Reference
The ARIMA Procedure
Overview: ARIMA Procedure
Getting Started: ARIMA Procedure
The Three Stages of ARIMA Modeling
Identification Stage
Estimation and Diagnostic Checking Stage
Forecasting Stage
Using ARIMA Procedure Statements
General Notation for ARIMA Models
Stationarity
Differencing
Subset, Seasonal, and Factored ARMA Models
Input Variables and Regression with ARMA Errors
Intervention Models and Interrupted Time Series
Rational Transfer Functions and Distributed Lag Models
Forecasting with Input Variables
Data Requirements
Syntax: ARIMA Procedure
Functional Summary
PROC ARIMA Statement
BY Statement
IDENTIFY Statement
ESTIMATE Statement
OUTLIER Statement
FORECAST Statement
Details: ARIMA Procedure
The Inverse Autocorrelation Function
The Partial Autocorrelation Function
The Cross-Correlation Function
The ESACF Method
The MINIC Method
The SCAN Method
Stationarity Tests
Prewhitening
Identifying Transfer Function Models
Missing Values and Autocorrelations
Estimation Details
Specifying Inputs and Transfer Functions
Initial Values
Stationarity and Invertibility
Naming of Model Parameters
Missing Values and Estimation and Forecasting
Forecasting Details
Forecasting Log Transformed Data
Specifying Series Periodicity
Detecting Outliers
OUT= Data Set
OUTCOV= Data Set
OUTEST= Data Set
OUTMODEL= SAS Data Set
OUTSTAT= Data Set
Printed Output
ODS Table Names
Statistical Graphics
Examples: ARIMA Procedure
Simulated IMA Model
Seasonal Model for the Airline Series
Model for Series J Data from Box and Jenkins
An Intervention Model for Ozone Data
Using Diagnostics to Identify ARIMA Models
Detection of Level Changes in the Nile River Data
Iterative Outlier Detection
References
The AUTOREG Procedure
Overview: AUTOREG Procedure
Getting Started: AUTOREG Procedure
Regression with Autocorrelated Errors
Forecasting Autoregressive Error Models
Testing for Autocorrelation
Stepwise Autoregression
Testing for Heteroscedasticity
Heteroscedasticity and GARCH Models
Syntax: AUTOREG Procedure
Functional Summary
PROC AUTOREG Statement
BY Statement
MODEL Statement
HETERO Statement
RESTRICT Statement
TEST Statement
OUTPUT Statement
Details: AUTOREG Procedure
Missing Values
Autoregressive Error Model
Alternative Autocorrelation Correction Methods
GARCH, IGARCH, EGARCH, and GARCH-M Models
R-Square Statistics and Other Measures of Fit
Generalized Durbin-Watson Tests
Testing
Predicted Values
OUT= Data Set
OUTEST= Data Set
Printed Output
ODS Table Names
ODS Graphics
Examples: AUTOREG Procedure
Analysis of Real Output Series
Comparing Estimates and Models
Lack-of-Fit Study
Missing Values
Money Demand Model
Estimation of ARCH(2) Process
Illustration of ODS Graphics
References
The COMPUTAB Procedure
Overview: COMPUTAB Procedure
Getting Started: COMPUTAB Procedure
Producing a Simple Report
Using PROC COMPUTAB
Defining Report Layout
Adding Computed Rows and Columns
Enhancing the Report
Syntax: COMPUTAB Procedure
Functional Summary
PROC COMPUTAB Statement
COLUMNS Statement
ROWS Statement
CELL Statement
INIT Statement
Programming Statements
BY Statement
SUMBY Statement
NOTRANS Option
Details: COMPUTAB Procedure
Program Flow Example
Order of Calculations
Column Selection
Controlling Execution within Row and Column Blocks
Program Flow
Direct Access to Table Cells
Reserved Words
Missing Values
OUT= Data Set
Examples: COMPUTAB Procedure
Using Programming Statements
Enhancing a Report
Comparison of Actual and Budget
Consolidations
Creating an Output Data Set
A What-If Market Analysis
Cash Flows
The COUNTREG Procedure
Overview: COUNTREG Procedure
Getting Started: COUNTREG Procedure
Syntax: COUNTREG Procedure
Functional Summary
PROC COUNTREG Statement
BOUNDS Statement
BY Statement
INIT Statement
MODEL Statement
OUTPUT Statement
RESTRICT Statement
ZEROMODEL Statement
Details: COUNTREG Procedure
Missing Values
Poisson Regression
Negative Binomial Regression
Zero-Inflated Count Regression Overview
Zero-Inflated Poisson Regression
Zero-Inflated Negative Binomial Regression
Computational Resources
Nonlinear Optimization Options
Covariance Matrix Types
Displayed Output
OUTPUT OUT= Data Set
OUTEST= Data Set
ODS Table Names
Examples: COUNTREG Procedure
Basic Models
ZIP and ZINB Models for Data Exhibiting Extra Zeros
References
The DATASOURCE Procedure
Overview: DATASOURCE Procedure
Getting Started: DATASOURCE Procedure
Structure of a SAS Data Set Containing Time Series Data
Reading Data Files
Subsetting Input Data Files
Controlling the Frequency of Data – The INTERVAL= Option
Selecting Time Series Variables – The KEEP and DROP Statements
Controlling the Time Range of Data – The RANGE Statement
Reading in Data Files Containing Cross Sections
Obtaining Descriptive Information on Cross Sections
Subsetting a Data File Containing Cross Sections
Renaming Time Series Variables
Changing the Lengths of Numeric Variables
Syntax: DATASOURCE Procedure
PROC DATASOURCE Statement
KEEP Statement
DROP Statement
KEEPEVENT Statement
DROPEVENT Statement
WHERE Statement
RANGE Statement
ATTRIBUTE Statement
FORMAT Statement
LABEL Statement
LENGTH Statement
RENAME Statement
Details: DATASOURCE Procedure
Variable Lists
OUT= Data Set
OUTCONT= Data Set
OUTBY= Data Set
OUTALL= Data Set
OUTEVENT= Data Set
Examples: DATASOURCE Procedure
BEA National Income and Product Accounts
BLS Consumer Price Index Surveys
BLS State and Area Employment, Hours, and Earnings Surveys
DRI/McGraw-Hill Format CITIBASE Files
DRI Data Delivery Service Database
PC Format CITIBASE Database
Quarterly COMPUSTAT Data Files
Annual COMPUSTAT Data Files, V9.2 New Filetype CSAUC3
CRSP Daily NYSE/AMEX Combined Stocks
Data Elements Reference: DATASOURCE Procedure
BEA Data Files
BLS Data Files
Global Insight DRI Data Files
COMPUSTAT Data Files
CRSP Stock Files
FAME Information Services Databases
Haver Analytics Data Files
IMF Data Files
OECD Data Files
References
The ENTROPY Procedure
Overview: ENTROPY Procedure
Getting Started: ENTROPY Procedure
Simple Regression Analysis
Using Prior Information
Pure Inverse Problems
Analyzing Multinomial Response Data
Syntax: ENTROPY Procedure
Functional Summary
PROC ENTROPY Statement
BOUNDS Statement
BY Statement
ID Statement
MODEL Statement
PRIORS Statement
RESTRICT Statement
TEST Statement
WEIGHT Statement
Details: ENTROPY Procedure
Generalized Maximum Entropy
Generalized Cross Entropy
Normed Moment Generalized Maximum Entropy
Maximum Entropy-Based Seemingly Unrelated Regression
Generalized Maximum Entropy for Multinomial Discrete Choice Models
Censored or Truncated Dependent Variables
Information Measures
Parameter Covariance For GCE
Parameter Covariance For GCE-NM
Statistical Tests
Missing Values
Input Data Sets
Output Data Sets
ODS Table Names
ODS Graphics
Examples: ENTROPY Procedure
Nonnormal Error Estimation
Unreplicated Factorial Experiments
Censored Data Models in PROC ENTROPY
Use of the PDATA= Option
Illustration of ODS Graphics
References
The ESM Procedure
Overview: ESM Procedure
Getting Started: ESM Procedure
Syntax: ESM Procedure
Functional Summary
PROC ESM Statement
BY Statement
FORECAST Statement
ID Statement
Details: ESM Procedure
Accumulation
Missing Value Interpretation
Transformations
Parameter Estimation
Missing Value Modeling Issues
Forecasting
Inverse Transformations
Statistics of Fit
Forecast Summation
Data Set Output
Printed Output
ODS Table Names
ODS Graphics
Examples: ESM Procedure
Forecasting of Time Series Data
Forecasting of Transactional Data
Specifying the Forecasting Model
Extending the Independent Variables for Multivariate Forecasts
Illustration of ODS Graphics
The EXPAND Procedure
Overview: EXPAND Procedure
Getting Started: EXPAND Procedure
Converting to Higher Frequency Series
Aggregating to Lower Frequency Series
Combining Time Series with Different Frequencies
Interpolating Missing Values
Requesting Different Interpolation Methods
Using the ID Statement
Specifying Observation Characteristics
Converting Observation Characteristics
Creating New Variables
Transforming Series
Syntax: EXPAND Procedure
Functional Summary
PROC EXPAND Statement
BY Statement
CONVERT Statement
ID Statement
Details: EXPAND Procedure
Frequency Conversion
Identifying Observations
Range of Output Observations
Extrapolation
OBSERVED= Option
Conversion Methods
Transformation Operations
OUT= Data Set
OUTEST= Data Set
ODS Graphics
Examples: EXPAND Procedure
Combining Monthly and Quarterly Data
Illustration of ODS Graphics
Interpolating Irregular Observations
Using Transformations
References
The FORECAST Procedure
Overview: FORECAST Procedure
Getting Started: FORECAST Procedure
Giving Dates to Forecast Values
Computing Confidence Limits
Form of the OUT= Data Set
Plotting Forecasts
Plotting Residuals
Model Parameters and Goodness-of-Fit Statistics
Controlling the Forecasting Method
Introduction to Forecasting Methods
Time Trend Models
Time Series Methods
Combining Time Trend with Autoregressive Models
Syntax: FORECAST Procedure
Functional Summary
PROC FORECAST Statement
BY Statement
ID Statement
VAR Statement
Details: FORECAST Procedure
Missing Values
Data Periodicity and Time Intervals
Forecasting Methods
Specifying Seasonality
Data Requirements
OUT= Data Set
OUTEST= Data Set
Examples: FORECAST Procedure
Forecasting Auto Sales
Forecasting Retail Sales
Forecasting Petroleum Sales
References
The LOAN Procedure
Overview: LOAN Procedure
Getting Started: LOAN Procedure
Analyzing Fixed Rate Loans
Analyzing Balloon Payment Loans
Analyzing Adjustable Rate Loans
Analyzing Buydown Rate Loans
Loan Repayment Schedule
Loan Comparison
Syntax: LOAN Procedure
Functional Summary
PROC LOAN Statement
FIXED Statement
BALLOON Statement
ARM Statement
BUYDOWN Statement
COMPARE Statement
Details: LOAN Procedure
Computational Details
Loan Comparison Details
OUT= Data Set
OUTCOMP= Data Set
OUTSUM= Data Set
Printed Output
ODS Table Names
Examples: LOAN Procedure
Discount Points for Lower Interest Rates
Refinancing a Loan
Prepayments on a Loan
Output Data Sets
Piggyback Loans
References
The MDC Procedure
Overview: MDC Procedure
Getting Started: MDC Procedure
Conditional Logit: Estimation and Prediction
Nested Logit Modeling
Multivariate Normal Utility Function
HEV and Multinomial Probit: Heteroscedastic Utility Function
Parameter Heterogeneity: Mixed Logit
Syntax: MDC Procedure
Functional Summary
PROC MDC Statement
MDCDATA Statement
BOUNDS Statement
BY Statement
ID Statement
MODEL Statement
NEST Statement
NLOPTIONS Statement
OUTPUT Statement
RESTRICT Statement
UTILITY Statement
Details: MDC Procedure
Multinomial Discrete Choice Modeling
Multinomial Logit and Conditional Logit
Heteroscedastic Extreme-Value Model
Mixed Logit Model
Multinomial Probit
Nested Logit
Decision Tree and Nested Logit
Model Fit and Goodness-of-Fit Statistics
OUTEST= Data Set
ODS Table Names
Examples: MDC Procedure
Binary Data Modeling
Conditional Logit and Data Conversion
Correlated Choice Modeling
Testing for Homoscedasticity of the Utility Function
Choice of Time for Work Trips: Nested Logit Analysis
Hausman’s Specification and Likelihood Ratio Tests
Acknowledgments: MDC Procedure
References
The MODEL Procedure
Overview: MODEL Procedure
Getting Started: MODEL Procedure
Nonlinear Regression Analysis
Nonlinear Systems Regression
General Form Models
Solving Simultaneous Nonlinear Equation Systems
Monte Carlo Simulation
Syntax: MODEL Procedure
Functional Summary
PROC MODEL Statement
BOUNDS Statement
BY Statement
CONTROL Statement
ENDOGENOUS Statement
ERRORMODEL Statement
ESTIMATE Statement
EXOGENOUS Statement
FIT Statement
ID Statement
INCLUDE Statement
INSTRUMENTS Statement
LABEL Statement
MOMENT Statement
OUTVARS Statement
PARAMETERS Statement
Programming Statements
RANGE Statement
RESET Statement
RESTRICT Statement
SOLVE Statement
TEST Statement
VAR Statement
WEIGHT Statement
Details: Estimation by the MODEL Procedure
Estimation Methods
Properties of the Estimates
Minimization Methods
Convergence Criteria
Troubleshooting Convergence Problems
Iteration History
Computer Resource Requirements
Testing for Normality
Heteroscedasticity
Testing for Autocorrelation
Transformation of Error Terms
Error Covariance Structure Specification
Ordinary Differential Equations
Restrictions and Bounds on Parameters
Tests on Parameters
Hausman Specification Test
Chow Tests
Profile Likelihood Confidence Intervals
Choice of Instruments
Autoregressive Moving-Average Error Processes
Distributed Lag Models and the %PDL Macro
Input Data Sets
Output Data Sets
ODS Table Names
ODS Graphics
Details: Simulation by the MODEL Procedure
Solution Modes
Multivariate t Distribution Simulation
Alternate Distribution Simulation
Mixtures of Distributions—Copulas
Solution Mode Output
Goal Seeking: Solving for Right-Hand-Side Variables
Numerical Solution Methods
Numerical Integration
Limitations
SOLVE Data Sets
Programming Language Overview: MODEL Procedure
Variables in the Model Program
Equation Translations
Derivatives
Mathematical Functions
Functions across Time
Language Differences
Storing Programs in Model Files
Diagnostics and Debugging
Analyzing the Structure of Large Models
Examples: MODEL Procedure
OLS Single Nonlinear Equation
A Consumer Demand Model
Vector AR(1) Estimation
MA(1) Estimation
Polynomial Distributed Lags by Using %PDL
General Form Equations
Spring and Damper Continuous System
Nonlinear FIML Estimation
Circuit Estimation
Systems of Differential Equations
Monte Carlo Simulation
Cauchy Distribution Estimation
Switching Regression Example
Simulating from a Mixture of Distributions
Simulated Method of Moments—Simple Linear Regression
Simulated Method of Moments—AR(1) Process
Simulated Method of Moments—Stochastic Volatility Model
Duration Data Model with Unobserved Heterogeneity
EMM Estimation of a Stochastic Volatility Model
Illustration of ODS Graphics
References
The PANEL Procedure
Overview: PANEL Procedure
Getting Started: PANEL Procedure
Specifying the Input Data
Specifying the Regression Model
Unbalanced Data
Introductory Example
Syntax: PANEL Procedure
Functional Summary
PROC PANEL Statement
BY Statement
CLASS Statement
FLATDATA Statement
ID Statement
INSTRUMENT Statement
LAG, ZLAG, XLAG, SLAG or CLAG Statement
MODEL Statement
OUTPUT Statement
RESTRICT Statement
TEST Statement
Details: PANEL Procedure
Missing Values
Computational Resources
Restricted Estimates
Notation
The One-Way Fixed-Effects Model
The Two-Way Fixed-Effects Model
Balanced Panels
Unbalanced Panels
Between Estimators
Pooled Estimator
The One-Way Random-Effects Model
The Two-Way Random-Effects Model
Parks Method (Autoregressive Model)
Da Silva Method (Variance-Component Moving-Average Model)
Dynamic Panel Estimator
Specification Testing For Dynamic Panel
Instrument Choice
Linear Hypothesis Testing
Heteroscedasticity-Corrected Covariance Matrices
R-Square
Specification Tests
Troubleshooting
ODS Graphics
The OUTPUT OUT= Data Set
The OUTEST= Data Set
The OUTTRANS= Data Set
Printed Output
ODS Table Names
Example: PANEL Procedure
Analyzing Demand for Liquid Assets
The Airline Cost Data: Fixtwo Model
ODS Graphics Plots
The Airline Cost Data: Further Analysis
The Airline Cost Data: Random-Effects Models
Using the FLATDATA Statement
The Cigarette Sales Data: Dynamic Panel Estimation with GMM
References: PANEL Procedure
The PDLREG Procedure
Overview: PDLREG Procedure
Getting Started: PDLREG Procedure
Introductory Example
Syntax: PDLREG Procedure
Functional Summary
PROC PDLREG Statement
BY Statement
MODEL Statement
OUTPUT Statement
RESTRICT Statement
Details: PDLREG Procedure
Missing Values
Polynomial Distributed Lag Estimation
Autoregressive Error Model Estimation
OUT= Data Set
Printed Output
ODS Table Names
Examples: PDLREG Procedure
Industrial Conference Board Data
Money Demand Model
References
The QLIM Procedure
Overview: QLIM Procedure
Getting Started: QLIM Procedure
Introductory Example: Binary Probit and Logit Models
Syntax: QLIM Procedure
Functional Summary
PROC QLIM Statement
BOUNDS Statement
BY Statement
CLASS Statement
ENDOGENOUS Statement
HETERO Statement
INIT Statement
MODEL Statement
NLOPTIONS Statement
OUTPUT Statement
RESTRICT Statement
TEST Statement
WEIGHT Statement
Details: QLIM Procedure
Ordinal Discrete Choice Modeling
Limited Dependent Variable Models
Stochastic Frontier Production and Cost Models
Heteroscedasticity and Box-Cox Transformation
Bivariate Limited Dependent Variable Modeling
Selection Models
Multivariate Limited Dependent Models
Tests on Parameters
Output to SAS Data Set
OUTEST= Data Set
Naming
ODS Table Names
Examples: QLIM Procedure
Ordered Data Modeling
Tobit Analysis
Bivariate Probit Analysis
Sample Selection Model
Sample Selection Model with Truncation and Censoring
Types of Tobit Models
Stochastic Frontier Models
References
The SIMILARITY Procedure
Overview: SIMILARITY Procedure
Getting Started: SIMILARITY Procedure
Syntax: SIMILARITY Procedure
Functional Summary
PROC SIMILARITY Statement
BY Statement
FCMPOPT Statement
ID Statement
INPUT Statement
TARGET Statement
Details: SIMILARITY Procedure
Accumulation
Missing Value Interpretation
Zero Value Interpretation
Time Series Transformation
Time Series Differencing
Time Series Missing Value Trimming
Time Series Descriptive Statistics
Input and Target Sequences
Sliding Sequences
Time Warping
Sequence Normalization
Sequence Scaling
Similarity Measures
User-Defined Functions and Subroutines
Output Data Sets
OUT= Data Set
OUTMEASURE= Data Set
OUTSUM= Data Set
OUTSEQUENCE= Data Set
OUTPATH= Data Set
STATUS Variable Values
Printed Output
ODS Tables Names
ODS Graphics
Examples: SIMILARITY Procedure
Accumulating Transactional Data into Time Series Data
Similarity Analysis
Sliding Similarity Analysis
Searching for Historical Analogies
References
The SIMLIN Procedure
Overview: SIMLIN Procedure
Getting Started: SIMLIN Procedure
Prediction and Simulation
Syntax: SIMLIN Procedure
Functional Summary
PROC SIMLIN Statement
BY Statement
ENDOGENOUS Statement
EXOGENOUS Statement
ID Statement
LAGGED Statement
OUTPUT Statement
Details: SIMLIN Procedure
Defining the Structural Form
Computing the Reduced Form
Dynamic Multipliers
Multipliers for Higher Order Lags
EST= Data Set
DATA= Data Set
OUTEST= Data Set
OUT= Data Set
Printed Output
ODS Table Names
Examples: SIMLIN Procedure
Simulating Klein’s Model I
Multipliers for a Third-Order System
References
The SPECTRA Procedure
Overview: SPECTRA Procedure
Getting Started: SPECTRA Procedure
Syntax: SPECTRA Procedure
Functional Summary
PROC SPECTRA Statement
BY Statement
VAR Statement
WEIGHTS Statement
Details: SPECTRA Procedure
Input Data
Missing Values
Computational Method
Kernels
White Noise Test
Transforming Frequencies
OUT= Data Set
Printed Output
ODS Table Names: SPECTRA procedure
Examples: SPECTRA Procedure
Spectral Analysis of Sunspot Activity
Cross-Spectral Analysis
References
The STATESPACE Procedure
Overview: STATESPACE Procedure
The State Space Model
How PROC STATESPACE Works
Getting Started: STATESPACE Procedure
Automatic State Space Model Selection
Specifying the State Space Model
Syntax: STATESPACE Procedure
Functional Summary
PROC STATESPACE Statement
BY Statement
FORM Statement
ID Statement
INITIAL Statement
RESTRICT Statement
VAR Statement
Details: STATESPACE Procedure
Missing Values
Stationarity and Differencing
Preliminary Autoregressive Models
Canonical Correlation Analysis
Parameter Estimation
Forecasting
Relation of ARMA and State Space Forms
OUT= Data Set
OUTAR= Data Set
OUTMODEL= Data Set
Printed Output
ODS Table Names
Examples: STATESPACE Procedure
Series J from Box and Jenkins
References
The SYSLIN Procedure
Overview: SYSLIN Procedure
Getting Started: SYSLIN Procedure
An Example Model
Variables in a System of Equations
Using PROC SYSLIN
OLS Estimation
Two-Stage Least Squares Estimation
LIML, K-Class, and MELO Estimation
SUR, 3SLS, and FIML Estimation
Computing Reduced Form Estimates
Restricting Parameter Estimates
Testing Parameters
Saving Residuals and Predicted Values
Plotting Residuals
Syntax: SYSLIN Procedure
Functional Summary
PROC SYSLIN Statement
BY Statement
ENDOGENOUS Statement
IDENTITY Statement
INSTRUMENTS Statement
MODEL Statement
OUTPUT Statement
RESTRICT Statement
SRESTRICT Statement
STEST Statement
TEST Statement
VAR Statement
WEIGHT Statement
Details: SYSLIN Procedure
Input Data Set
Estimation Methods
ANOVA Table for Instrumental Variables Methods
The R-Square Statistics
Computational Details
Missing Values
OUT= Data Set
OUTEST= Data Set
OUTSSCP= Data Set
Printed Output
ODS Table Names
ODS Graphics
Examples: SYSLIN Procedure
Klein’s Model I Estimated with LIML and 3SLS
Grunfeld’s Model Estimated with SUR
Illustration of ODS Graphics
References
The TIMESERIES Procedure
Overview: TIMESERIES Procedure
Getting Started: TIMESERIES Procedure
Syntax: TIMESERIES Procedure
Functional Summary
PROC TIMESERIES Statement
BY Statement
CORR Statement
CROSSCORR Statement
DECOMP Statement
ID Statement
SEASON Statement
TREND Statement
VAR and CROSSVAR Statements
Details: TIMESERIES Procedure
Accumulation
Missing Value Interpretation
Time Series Transformation
Time Series Differencing
Descriptive Statistics
Seasonal Decomposition
Correlation Analysis
Cross-Correlation Analysis
Data Set Output
OUT= Data Set
OUTCORR= Data Set
OUTCROSSCORR= Data Set
OUTDECOMP= Data Set
OUTSEASON= Data Set
OUTSUM= Data Set
OUTTREND= Data Set
STATUS Variable Values
Printed Output
ODS Table Names
ODS Graphics Names
Examples: TIMESERIES Procedure
Accumulating Transactional Data into Time Series Data
Trend and Seasonal Analysis
Illustration of ODS Graphics
References
The TSCSREG Procedure
Overview: The TSCSREG Procedure
Getting Started: The TSCSREG Procedure
Specifying the Input Data
Unbalanced Data
Specifying the Regression Model
Estimation Techniques
Introductory Example
Syntax: The TSCSREG Procedure
Functional Summary
PROC TSCSREG Statement
BY Statement
ID Statement
MODEL Statement
TEST Statement
Details: The TSCSREG Procedure
ODS Table Names
Examples: The TSCSREG Procedure
Acknowledgments: TSCSREG Procedure
References: TSCSREG Procedure
The UCM Procedure
Overview: UCM Procedure
Getting Started: UCM Procedure
A Seasonal Series with Linear Trend
Syntax: UCM Procedure
Functional Summary
PROC UCM Statement
AUTOREG Statement
BLOCKSEASON Statement
BY Statement
CYCLE Statement
DEPLAG Statement
ESTIMATE Statement
FORECAST Statement
ID Statement
IRREGULAR Statement
LEVEL Statement
MODEL Statement
NLOPTIONS Statement
OUTLIER Statement
RANDOMREG Statement
SEASON Statement
SLOPE Statement
SPLINEREG Statement
SPLINESEASON Statement
Details: UCM Procedure
An Introduction to Unobserved Component Models
The UCMs as State Space Models
Outlier Detection
Missing Values
Parameter Estimation
Computational Issues
Displayed Output
Statistical Graphics
ODS Table Names
ODS Graph Names
OUTFOR= Data Set
OUTEST= Data Set
Statistics of Fit
Examples: UCM Procedure
The Airline Series Revisited
Variable Star Data
Modeling Long Seasonal Patterns
Modeling Time-Varying Regression Effects Using the RANDOMREG Statement
Trend Removal Using the Hodrick-Prescott Filter
Using Splines to Incorporate Nonlinear Effects
Detection of Level Shift
ARIMA Modeling
References
The VARMAX Procedure
Overview: VARMAX Procedure
Getting Started: VARMAX Procedure
Vector Autoregressive Process
Bayesian Vector Autoregressive Process
Vector Error Correction Model
Bayesian Vector Error Correction Model
Vector Autoregressive Process with Exogenous Variables
Parameter Estimation and Testing on Restrictions
Causality Testing
Syntax: VARMAX Procedure
Functional Summary
PROC VARMAX Statement
BY Statement
CAUSAL Statement
COINTEG Statement
ID Statement
MODEL Statement
GARCH Statement
NLOPTIONS Statement
OUTPUT Statement
RESTRICT Statement
TEST Statement
Details: VARMAX Procedure
Missing Values
VARMAX Model
Dynamic Simultaneous Equations Modeling
Impulse Response Function
Forecasting
Tentative Order Selection
VAR and VARX Modeling
Bayesian VAR and VARX Modeling
VARMA and VARMAX Modeling
Model Diagnostic Checks
Cointegration
Vector Error Correction Modeling
I(2) Model
Multivariate GARCH Modeling
Output Data Sets
OUT= Data Set
OUTEST= Data Set
OUTHT= Data Set
OUTSTAT= Data Set
Printed Output
ODS Table Names
ODS Graphics
Computational Issues
Examples: VARMAX Procedure
Analysis of U.S. Economic Variables
Analysis of German Economic Variables
Numerous Examples
Illustration of ODS Graphics
References
The X11 Procedure
Overview: X11 Procedure
Getting Started: X11 Procedure
Basic Seasonal Adjustment
X-11-ARIMA
Syntax: X11 Procedure
Functional Summary
PROC X11 Statement
ARIMA Statement
BY Statement
ID Statement
MACURVES Statement
MONTHLY Statement
OUTPUT Statement
PDWEIGHTS Statement
QUARTERLY Statement
SSPAN Statement
TABLES Statement
VAR Statement
Details: X11 Procedure
Historical Development of X-11
Implementation of the X-11 Seasonal Adjustment Method
Computational Details for Sliding Spans Analysis
Data Requirements
Missing Values
Prior Daily Weights and Trading-Day Regression
Adjustment for Prior Factors
The YRAHEADOUT Option
Effect of Backcast and Forecast Length
Details of Model Selection
OUT= Data Set
The OUTSPAN= Data Set
OUTSTB= Data Set
OUTTDR= Data Set
Printed Output
ODS Table Names
Examples: X11 Procedure
Component Estimation—Monthly Data
Components Estimation—Quarterly Data
Outlier Detection and Removal
References
The X12 Procedure
Overview: X12 Procedure
Getting Started: X12 Procedure
Basic Seasonal Adjustment
Syntax: X12 Procedure
Functional Summary
PROC X12 Statement
BY Statement
ID Statement
EVENT Statement
INPUT Statement
ADJUST Statement
ARIMA Statement
ESTIMATE Statement
FORECAST Statement
IDENTIFY Statement
AUTOMDL Statement
OUTPUT Statement
OUTLIER Statement
REGRESSION Statement
TABLES Statement
TRANSFORM Statement
USERDEFINED Statement
VAR Statement
X11 Statement
Details: X12 Procedure
Missing Values
Combined Test for the Presence of Identifiable Seasonality
Computations
Displayed Output/ODS Table Names/OUTPUT Tablename Keywords
ODS Graphics
Special Data Sets
Examples: X12 Procedure
Model Identification
Model Estimation
Seasonal Adjustment
RegARIMA Automatic Model Selection
Automatic Outlier Detection
User-Defined Regressors
MDLINFOIN= and MDLINFOOUT= Data Sets
Setting Regression Parameters
Illustration of ODS Graphics
Acknowledgments: X12 Procedure
References
Data Access Engines
The SASECRSP Interface Engine
Overview: SASECRSP Interface Engine
Introduction
Opening a Database
Using Your Opened Database
Getting Started: SASECRSP Interface Engine
Structure of a SAS Data Set That Contains Time Series Data
Reading CRSP Data Files
Using the SAS DATA Step
Using SAS Procedures
Using CRSP Date Formats, Informats, and Functions
Syntax: SASECRSP Interface Engine
The LIBNAME libref SASECRSP Statement
Details: SASECRSP Interface Engine
Using the Inset Option
The SAS Output Data Set
Understanding CRSP Date Formats, Informats, and Functions
Examples: SASECRSP Interface Engine
Specifying PERMNOs and RANGE on the LIBNAME Statement
Using the LIBNAME Statement to Access All Keys
Accessing One PERMNO Using No RANGE
Specifying Keys Using the INSET= Option
Specifying Ranges for Individual Keys with the INSET= Option
Converting Dates By Using the CRSP Date Functions
Comparing Different Ways of Accessing CCM Data
Comparing PERMNO and GVKEY Access of CRSP Stock Data
Using Fiscal Date Range Restriction
Using Different Types of Range Restrictions in the INSET
Using INSET Ranges with the LIBNAME RANGE Option
Data Elements Reference: SASECRSP Interface Engine
Available CRSP Stock Data Sets
Available Compustat Data Sets
Available CRSP Indices Data Sets
References
Acknowledgments
The SASEFAME Interface Engine
Overview: SASEFAME Interface Engine
Getting Started: SASEFAME Interface Engine
Structure of a SAS Data Set Containing Time Series Data
Reading and Converting FAME Database Time Series
Using the SAS DATA Step
Using SAS Procedures
Using the SAS Windowing Environment
Using Remote FAME Data Access
Creating Views of Time Series Using SASEFAME LIBNAME Options
Syntax: SASEFAME Interface Engine
The LIBNAME libref SASEFAME Statement
Details: SASEFAME Interface Engine
The SAS Output Data Set
Mapping FAME Frequencies to SAS Time Intervals
Examples: SASEFAME Interface Engine
Converting an Entire FAME Database
Reading Time Series from the FAME Database
Writing Time Series to the SAS Data Set
Limiting the Time Range of Data
Creating a View Using the SQL Procedure and SASEFAME
Reading Other FAME Data Objects with the FAMEOUT= Option
Remote FAME Access Using FAME CHLI
Selecting Time Series Using CROSSLIST= Option and KEEP Statement
Selecting Time Series Using CROSSLIST= Option with a FAME Namelist of Tickers
Selecting Time Series Using CROSSLIST= Option with INSET= and WHERE=TICK
Selecting Series Using FAMEOUT= Option
References: SASEFAME Interface Engine
Acknowledgments
The SASEHAVR Interface Engine
Overview: SASEHAVR Interface Engine
Getting Started: SASEHAVR Interface Engine
Structure of a SAS Data Set Containing Time Series Data
Reading and Converting HAVER DLX Time Series
Using the SAS DATA Step
Using the SAS Windowing Environment
Syntax: SASEHAVR Interface Engine
The LIBNAME libref SASEHAVR Statement
Details: SASEHAVR Interface Engine
The SAS Output Data Set
Mapping HAVER Frequencies to SAS Time Intervals
Error Recovery for SASEHAVR
Examples: SASEHAVR Interface Engine
Examining the Contents of a HAVER Database
Viewing Quarterly Time Series from a HAVER Database
Viewing Monthly Time Series from a HAVER Database
Viewing Weekly Time Series from a HAVER Database
Viewing Daily Time Series from a HAVER Database
Limiting the Range of Time Series from a HAVER Database
Using the WHERE Statement to Subset Time Series from a HAVER Database
Using the KEEP Option to Subset Time Series from a HAVER Database
Using the SOURCE Option to Subset Time Series from a HAVER Database
Using the GROUP Option to Subset Time Series from a HAVER Database
Data Elements Reference: SASEHAVR Interface Engine
HAVER ANALYTICS DLX Database Profile
References
Acknowledgments
Time Series Forecasting System
Overview of the Time Series Forecasting System
Introduction
Using the Time Series Forecasting System
SAS Software Products Needed
Getting Started with Time Series Forecasting
The Time Series Forecasting Window
Outline of the Forecasting Process
Specify the Input Data Set
Provide a Valid Time ID Variable
Select and Fit a Forecasting Model for Each Series
Produce the Forecasts
Save Your Work
Summary
The Input Data Set
The Data Set Selection Window
Time Series Data Sets, ID Variables, and Time Intervals
Automatic Model Fitting Window
Produce Forecasts Window
The Forecast Data Set
Forecasting Projects
Saving and Restoring Project Information
Sharing Projects
Develop Models Window
Introduction
Fitting Models
Model List and Statistics of Fit
Model Viewer
Prediction Error Plots
Autocorrelation Plots
White Noise and Stationarity Plots
Parameter Estimates Table
Statistics of Fit Table
Changing to a Different Model
Forecasts and Confidence Limits Plots
Data Table
Closing the Model Viewer
Creating Time ID Variables
Creating a Time ID Value from a Starting Date and Frequency
Using Observation Numbers as the Time ID
Creating a Time ID from Other Dating Variables
Specifying Forecasting Models
Series Diagnostics
Models to Fit Window
Automatic Model Selection
Smoothing Model Specification Window
ARIMA Model Specification Window
Factored ARIMA Model Specification Window
Custom Model Specification Window
Editing the Model Selection List
Forecast Combination Model Specification Window
Incorporating Forecasts from Other Sources
Choosing the Best Forecasting Model
Time Series Viewer Features
Model Viewer Prediction Error Analysis
The Model Selection Criterion
Sorting and Selecting Models
Comparing Models
Controlling the Period of Evaluation and Fit
Refitting and Reevaluating Models
Using Hold-out Samples
Using Predictor Variables
Linear Trend
Time Trend Curves
Regressors
Adjustments
Dynamic Regressor
Interventions
The Intervention Specification Window
Specifying a Trend Change Intervention
Specifying a Level Change Intervention
Modeling Complex Intervention Effects
Fitting the Intervention Model
Limitations of Intervention Predictors
Seasonal Dummies
References
Command Reference
TSVIEW Command and Macro
Syntax
Examples
FORECAST Command and Macro
Syntax
Examples
Window Reference
Overview
Adjustments Selection Window
AR/MA Polynomial Specification Window
ARIMA Model Specification Window
ARIMA Process Specification Window
Automatic Model Fitting Window
Automatic Model Fitting Results Window
Automatic Model Selection Options Window
Custom Model Specification Window
Data Set Selection Window
Default Time Ranges Window
Develop Models Window
Differencing Specification Window
Dynamic Regression Specification Window
Dynamic Regressors Selection Window
Error Model Options Window
External Forecast Model Specification Window
Factored ARIMA Model Specification Window
Forecast Combination Model Specification Window
Forecasting Project File Selection Window
Forecast Options Window
Intervention Specification Window
Interventions for Series Window
Manage Forecasting Project Window
Model Fit Comparison Window
Model List Window
Model Selection Criterion Window
Model Selection List Editor Window
Model Viewer Window
Models to Fit Window
Polynomial Specification Window
Produce Forecasts Window
Regressors Selection Window
Save Data As
Save Graph As
Seasonal ARIMA Model Options Window
Series Diagnostics Window
Series Selection Window
Series to Process Window
Series Viewer Transformations Window
Smoothing Model Specification Window
Smoothing Weight Optimization Window
Statistics of Fit Selection Window
Time ID Creation – 1,2,3 Window
Time ID Creation from Several Variables Window
Time ID Creation from Starting Date Window
Time ID Creation Using Informat Window
Time ID Variable Specification Window
Time Ranges Specification Window
Time Series Forecasting Window
Time Series Simulation Window
Time Series Viewer Window
Forecasting Process Details
Forecasting Process Summary
Parameter Estimation
Model Evaluation
Forecasting
Forecast Combination Models
External or User-Supplied Forecasts
Adjustments
Series Transformations
Smoothing Models
Smoothing Model Calculations
Missing Values
Predictions and Prediction Errors
Smoothing Weights
Equations for the Smoothing Models
ARIMA Models
Notation for ARIMA Models
Predictor Series
Time Trend Curves
Intervention Effects
Seasonal Dummy Inputs
Series Diagnostic Tests
Statistics of Fit
References
Investment Analysis
Overview
About Investment Analysis
Starting Investment Analysis
Getting Help
Using Help
Software Requirements
Portfolios
The File Menu
Tasks
Creating a New Portfolio
Saving a Portfolio
Opening an Existing Portfolio
Saving a Portfolio to a Different Name
Selecting Investments within a Portfolio
Dialog and Utility Guide
Investment Analysis
Menu Bar Options
Right-Clicking within the Portfolio Area
Investments
The Investment Menu
Tasks
Loan Tasks
Specifying Savings Terms to Create an Account Summary
Depreciation Tasks
Bond Tasks
Generic Cashflow Tasks
Dialog Box Guide
Loan
Loan Initialization Options
Loan Prepayments
Balloon Payments
Rate Adjustment Terms
Rounding Off
Savings
Depreciation
Depreciation Table
Bond
Bond Analysis
Bond Price
Generic Cashflow
Right-Clicking within Generic Cashflow’s Cashflow Specification Area
Flow Specification
Forecast Specification
Computations
The Compute Menu
Tasks
Taxing a Cashflow
Converting Currency
Deflating Cashflows
Dialog Box Guide
After Tax Cashflow Calculation
Currency Conversion
Constant Dollar Calculation
Analyses
The Analyze Menu
Tasks
Performing Time Value Analysis
Computing an Internal Rate of Return
Performing a Benefit-Cost Ratio Analysis
Computing a Uniform Periodic Equivalent
Performing a Breakeven Analysis
Dialog Box Guide
Time Value Analysis
Uniform Periodic Equivalent
Internal Rate of Return
Benefit-Cost Ratio Analysis
Breakeven Analysis
Breakeven Graph
Details
Investments and Data Sets
Saving Output to SAS Data Sets
Loading a SAS Data Set into a List
Saving Data from a List to a SAS Data Set
Right Mouse Button Options
Depreciation Methods
Straight Line (SL)
Sum-of-Years Digits
Declining Balance (DB)
Rate Information
The Tools Menu
Dialog Box Guide
Minimum Attractive Rate of Return (MARR)
Income Tax Specification
Inflation Specification
Reference
Product
Release
SAS/ETS
9.2
Type
Usage and Reference
Copyright Date
March 2008
Last Updated
08Dec2010