The EXPAND Procedure

Using the ID Statement

An ID statement is normally used with PROC EXPAND to specify a SAS date or datetime variable to identify the time of each input observation. An ID variable allows PROC EXPAND to do the following:

  • identify the observations in the output data set

  • determine the time span between observations and detect gaps in the input series caused by omitted observations

  • account for calendar effects such as the number of days in each month and leap years

If you do not specify an ID variable with SAS date or datetime values, PROC EXPAND makes default assumptions that may not be what you want. See the section ID Statement for details.