Chapter Contents |
Previous |
Next |
Working with Time Series Data |
Time series data can be recorded in many different ways. The section "Reading Time Series Data" later in this chapter discusses some of the possibilities. The example below shows a simple case.
The following SAS statements read monthly values of the U.S. Consumer Price Index for June 1990 through July 1991. The data set USCPI is shown in Figure 2.1.
data uscpi; input year month cpi; datalines; 1990 6 129.9 1990 7 130.4 1990 8 131.6 1990 9 132.7 1990 10 133.5 1990 11 133.8 1990 12 133.8 1991 1 134.6 1991 2 134.8 1991 3 135.0 1991 4 135.2 1991 5 135.6 1991 6 136.0 1991 7 136.2 ; proc print data=uscpi; run;
When a time series is stored in the manner shown by this example, the terms series and variable can be used interchangeably. There is one observation per row, and one series/variable per column.
Chapter Contents |
Previous |
Next |
Top |
Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.