Working with Time Series Data |
Reading a Simple List of Values |
Time series data can be coded as a simple list of values without dating information and with an arbitrary number of observations on each data record. In this case, the INPUT statement must use the trailing "@@" option to retain the current data record after reading the values for each observation, and the time ID variable must be generated with programming statements.
For example, the following statements read the USPRICE data set from data records that contain pairs of values for CPI and PPI. This example assumes you know that the first pair of values is for June 1990.
data usprice; input cpi ppi @@; date = intnx( 'month', '1jun1990'd, _n_-1 ); format date monyy7.; datalines; 129.9 114.3 130.4 114.5 131.6 116.5 132.7 118.4 133.5 120.8 133.8 120.1 133.8 118.7 134.6 119.0 134.8 117.2 135.0 116.2 135.2 116.0 135.6 116.5 136.0 116.3 136.2 116.0 ;
Copyright © SAS Institute, Inc. All Rights Reserved.