2975 Overview of SAS/ETS Model Editor The SAS/ETS Model Editor enables you to interactively create and edit model templates and fitted models that are associated with econometric time se
Trang 12922
Trang 2Part V SAS/ETS Model Editor (Experimental)
Trang 32924
Trang 4Chapter 47
SAS/ETS Model Editor Window Reference
Contents
Overview of SAS/ETS Model Editor 2926
Invoking the SAS/ETS Model Editor Application 2926
Model Browser Window 2927
Create a New Model Template 2928
Equations Details 2930
Constraints Details 2932
New Fitted Model Wizard 2934
Name Your Model Page 2936
Select the Data Set to Fit Page 2936
Assign Variables Page 2940
Enter (Verify) the Formula for Your Model Page 2942
Map Program Symbols to Data Set Variable Page 2943
Set Fit Options Page 2945
Output and Reports 2952
Equation Results Window 2952
Time Series Window 2954
Graphing Options Window 2955
Model Summary Results Window 2956
Fitted Model Equation Results Window 2958
Fitted Model Covariance/Correlation Matrix Window 2959
Fitted Model Distribution Window 2959
Model Parameters Estimates Window 2960
Residuals Plot Window 2961
Model Summary of Residual Errors Window 2962
Actual v/s Predicted Plot Window 2962
Edit Existing Fitted Model 2963
Open Existing Model 2963
Fit Model—Equations 2964
Fit Model—Input 2965
Fit Model—Method 2967
Fit Model—Iteration 2967
Fit Model—Tests 2969
Fit Model—Results 2970
Define the Model Parameters and Variables 2971
Trang 52926 F Chapter 47: SAS/ETS Model Editor Window Reference
Model Equations 2973
Define the Model Parameters, Variables, and Equations 2974
Model Constraints 2975
Overview of SAS/ETS Model Editor
The SAS/ETS Model Editor enables you to interactively create and edit model templates and fitted models that are associated with econometric time series models and risk models These models are developed from time series and cross-sectional data You can use these models to statistically model market behavior
The SAS/ETS Model Editor consists of the following:
a fitted model wizard with which you can create and define the equation statements, variables and parameters, constraints, and fit options on a step-by-step basis You can apply a fitted model to any specific market data
a program editor panel, which enables you to write programming code to define your model and create additional dialog boxes The additional dialog boxes enable you to more explicity specify properties associated with your model
a model template which you can also create to define the equation statements, variables and parameters, and constraints that you need in the programming code Model templates are commonly used models that can be applied to a wide variety of data
You can use either the Fitted Model Wizard or a model template to fit the model to a specific market data set to generate the model parameter estimates and other statistical results as specified in the MODEL procedure The MODEL procedure analyzes models in which the relationships among the variables comprise a system of one or more nonlinear equations Primary uses of the MODEL procedure are estimation, simulation, and forecasting of nonlinear simultaneous equation models See Chapter 18, “The MODEL Procedure” (SAS/ETS User’s Guide), for more information.This chapter provides a reference to the various windows of the SAS/ETS Model Editor The windows are presented in work flow order Each section describes the purpose of the window, how to open it, its controls, fields, and menus
Invoking the SAS/ETS Model Editor Application
You can start the SAS/ETS Model Editor application when using the SAS system interactively by submitting the command%modedit;in the SAS Display Manager Program Editor, as shown in
Figure 47.1
Trang 6Model Browser Window F 2927
Figure 47.1 Invoking the SAS/ETS Model Editor
Model Browser Window
From the SAS/ETS Model Editor main menu, select View IShow Model Browser to open the Model Browser window The Model Browser window displays a list of the model templates and fitted models along with attributes about each item in the list When the window first opens, the list contains all the model templates and fitted models that are displayed in the model tree in the desktop
To constrain the items in the list, click Find and specify your constraints You can sort the data in each column by clicking the column heading You can also right-click any row in the table to access the same pop-up menu that is available for entries in the model tree on the desktop
Figure 47.2 Model Browser Window
The Model Browser window has the following controls and fields:
Trang 72928 F Chapter 47: SAS/ETS Model Editor Window Reference
Types:
specifies which types of model you want to view You can select Model Templates, Fitted Models, or both
Library Name:
is the name of the library (for example, RISKSAMP) where the models are located
NOTE: Predefined libraries, such as RISKSAMP, contain predefined, read-only models You can open and apply these models to specific market data sets But if you want to modify a predefined model template, you need to copy or rename the model template into a temporary directory such as WORK or SASUSER, rename it, and work from there To copy an object to
a desired library, right-click the object and select Duplicate
Data Set Name:
is the input data set in which the model resides
Find
enables you to constrain the data displayed in Model Browser window to only those models that match the search criteria indicated
Model Name:
is the name of the model A model name can contain up to 32 characters, which can be underscores, letters (A–Z or a–z) or numerals (0–9) A model name cannot contain spaces Interval:
is the time interval (data frequency) for the input data set
Specify
specifies which time frequency is to be used in the time series model Click Specify to open the Specify Frequency window, which is described in the section “Specify Frequency Window”
on page 2938
Clear
clears the search criteria that you have currently specified and resets the search fields to the defaults
Create a New Model Template
A model template is a convenient way to predefine a commonly used model After you create a model template, you can use it repeatedly to create a fitted model for various data sets without recreating the model parameters, equations, and constraints To create a new model template, right-click a SAS library in the SAS libraries panel, and then select New Model Template A window opens with its title of the form SASLibrary.newElement
In this window, you can do the following:
specify the equations and variable and parameter definitions in Equations on the Details tab See “Equations Details” on page 2930 for more details
Trang 8Create a New Model Template F 2929
specify the model constraints for the model in Constraints on the Details tab See “ Con-straints Details” on page 2932 for more details
view the generated SAS code on the SAS Code tab
check the syntax of the SAS code by clicking the Check Syntax button
save the model template by clicking OK
For information about equation statements, variable and parameter definitions, and constraints in the MODEL procedure, see Chapter 18, “The MODEL Procedure” (SAS/ETS User’s Guide), for more information
The top of the model window has the following fields:
Name:
is the name of the current new model You can change the default name to another name such
as “MYSPEC” A name can contain up to 32 characters, which can be underscores, letters (A–Z or a–z) or numerals (0–9) A name cannot contain spaces
Description:
is description of the model You can type some description such as “My favorite template” This field is optional
Library:
is the SAS library where the model is to be stored
The model window has two tabs: Details and SAS Code On the Details tab, you can select Equations or Constraints in the left pane; the fields displayed in the right pane change dependent
on the selection in the left pane For more information about the Details tab, see “Equations Details”
on page 2930 and “Constraints Details” on page 2932
When you define the model variables and equations, you can click SAS Code tab to view the MODEL procedure code that is generated by the values specified on the Details tab The following SAS statements provide an example of equivalent PROC MODEL code See Chapter 18, “The MODEL Procedure” (SAS/ETS User’s Guide), for more information about PROC MODEL
proc model outspec=(WORK.MODSPEC specname=CIR speclabel="Cox Ingersoll Ross") ; endogenous rate ;
parms kappa ;
parms theta ;
parms sigma ;
label kappa = 'Speed of Mean Reversion' ;
label theta = 'Long term Mean' ;
label sigma = 'Constant part of Variance' ;
rate = lag(rate) + kappa * (theta - lag(rate) ) ;
h.rate = sigma * sigma * lag(rate);
run;
quit;
Trang 92930 F Chapter 47: SAS/ETS Model Editor Window Reference
Equations Details
When you select Equations on the Details tab, you can specify the equation for a model and define the variables and parameters for the model
Figure 47.3 Create New Model Template—Equations
Trang 10Equations Details F 2931
When Equations is selected on the Details tab, the following controls and fields are displayed:
Equation:
specifies the equations for the model
Variable and Parameter Definitions
lists the variables and parameters for the model that is defined in the Equation: field To add
a new row, click the Add button A new entry appears in the Variable and Parameter Definitions table To edit the value for an entry, double-click the appropriate cell in the Variable and Parameter Definitions table To delete an entry, select an existing entry and then click the Delete button
Name
specifies the name of the variable or parameter
Type
specifies the variable type (such as endogenous)
Label
specifies the label of the variable or parameter
Instrument?
specifies whether the variable or parameter is an instrument
Output To Data Set
specifies the output to data set options The selections map to the options DROP, KEEP, and OUTVARS of the MODEL procedure
All dependent variables are instruments
indicates whether all of the exogenous variables are to be instrumental variables (This check box is equivalent to the _EXOG_ option in the INSTRUMENTS statement in the MODEL procedure See Chapter 18, “The MODEL Procedure” (SAS/ETS User’s Guide), for more information about PROC MODEL
Instruments Only Use Intercept
indicates whether to include only the intercept in the list to be an instrument variable
Instruments Include Intercept
indicates whether to include an intercept term and all of the exogenous variables as instrumental variables
ID
specifies the name of the ID variable to be created for the input data set You can type any valid SAS variable name in this field or select from the list
Range:
specifies the time range between observations in the data set Select a range from list
Start:
specifies the starting date for the time series in the data set Enter a date value in this field, using a form that is recognizable as a SAS date informat (for example, 1998:1, feb1997, or 03mar1998)