Chapter Contents |
Previous |
Next |
Working with Time Series Data |
This section discusses aspects of storing time series in SAS data sets. The topics discussed are the standard form of a time series data set, storing several series with different time ranges in the same data set, omitted observations, cross-sectional dimensions and BY groups, and interleaved time series.
Any number of time series can be stored in a SAS data set. Normally, each time series is stored in a separate variable. For example, the following statements augment the USCPI data set read in the previous example with values for the producer price index.
data usprice; input date monyy7. cpi ppi; format date monyy7.; label cpi = "Consumer Price Index" ppi = "Producer Price Index"; datalines; jun1990 129.9 114.3 jul1990 130.4 114.5 aug1990 131.6 116.5 sep1990 132.7 118.4 oct1990 133.5 120.8 nov1990 133.8 120.1 dec1990 133.8 118.7 jan1991 134.6 119.0 feb1991 134.8 117.2 mar1991 135.0 116.2 apr1991 135.2 116.0 may1991 135.6 116.5 jun1991 136.0 116.3 jul1991 136.2 116.0 ; proc print data=usprice; run;
Chapter Contents |
Previous |
Next |
Top |
Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.