tailieunhanh - SAS/ETS 9.22 User's Guide 9

SAS/Ets User's Guide 9. Provides detailed reference material for using SAS/ETS software and guides you through the analysis and forecasting of features such as univariate and multivariate time series, cross-sectional time series, seasonal adjustments, multiequational nonlinear models, discrete choice models, limited dependent variable models, portfolio analysis, and generation of financial reports, with introductory and advanced examples for each procedure. You can also find complete information about two easy-to-use point-and-click applications: the Time Series Forecasting System, for automatic and interactive time series modeling and forecasting, and the Investment Analysis System, for time-value of money analysis of a variety of investments | 72 F Chapter 3 Working with Time Series Data However using a single SAS date or datetime ID variable is more convenient and enables you to take advantage of some features SAS ETS procedures provide for processing ID variables. One such feature is automatic extrapolation of the ID variable to identify forecast observations. These features are discussed in following sections. Thus it is a good practice to include a SAS date or datetime ID variable in all the time series SAS data sets you create. It is also a good practice to always give the date or datetime ID variable a format appropriate for the data periodicity. For information about creating SAS date and datetime values from multiple ID variables see the section Computing Dates from Calendar Variables on page 95. You can assign a SAS date- or datetime-valued ID variable any name that conforms to SAS variable name requirements. However you might find working with time series data in SAS easier and less confusing if you adopt the practice of always using the same name for the SAS date or datetime ID variable. This book always names the date- or datetime-values ID variable DATE if it contains SAS date values or DATETIME if it contains SAS datetime values. This makes it easy to recognize the ID variable and also makes it easy to recognize whether this ID variable uses SAS date or datetime values. Sorting by Time Many SAS ETS procedures assume the data are in chronological order. If the data are not in time order you can use the SORT procedure to sort the data set. For example proc sort data a by date run There are many ways of coding the time ID variable or variables and some ways do not sort correctly. If you use SAS date or datetime ID values as suggested in the preceding section you do not need to be concerned with this issue. But if you encode date values in nonstandard ways you need to consider whether your ID variables will sort. SAS date and datetime values always sort correctly as do combinations of numeric .