The DATASOURCE Procedure |
Structure of a SAS Data Set Containing Time Series Data |
SAS procedures require time series data to be in a specific form recognizable by the SAS System. This form is a two-dimensional array, called a SAS data set, whose columns correspond to series variables and whose rows correspond to measurements of these variables at certain time periods.
The time periods at which observations are recorded can be included in the data set as a time ID variable. The DATASOURCE procedure does include a time ID variable by the name of DATE.
For example, the following data set in Table 11.1, extracted from a DRIBASIC data file, gives the foreign exchange rates for Japan, Switzerland, and the United Kingdom, respectively.
Time ID |
Time Series |
||
Variable |
Variables |
||
DATE |
EXRJAN |
EXRSW |
EXRUK |
SEP1987 |
143.290 |
1.50290 |
164.460 |
OCT1987 |
143.320 |
1.49400 |
166.200 |
NOV1987 |
135.400 |
1.38250 |
177.540 |
DEC1987 |
128.240 |
1.33040 |
182.880 |
JAN1988 |
127.690 |
1.34660 |
180.090 |
FEB1988 |
129.170 |
1.39160 |
175.820 |
Copyright © SAS Institute, Inc. All Rights Reserved.