Working with Time Series Data |
Using the WHERE Statement with SAS Procedures |
Use the WHERE statement with SAS procedures to process only a subset of the input data set. For example, suppose you have a data set that contains monthly observations for each of several states, and you want to use the AUTOREG procedure to analyze data since 1970 for the state NC. You could use the following statements:
proc autoreg data=full; where date >= '1jan1970'd & state = 'NC'; ... additional statements ... run;
You can specify any number of conditions in the WHERE statement. For example, suppose that a strike created an outlier in May 1975, and you want to exclude that observation. You could use the following statements:
proc autoreg data=full; where date >= '1jan1970'd & state = 'NC' & date ^= '1may1975'd; ... additional statements ... run;
Copyright © SAS Institute, Inc. All Rights Reserved.