TIMEID Procedure
Example 37.2 Inferring a Date Interval
(View the complete code for this example.)
This example illustrates how a time ID variable can be inferred from a data set when a sufficient number of observations are present.
data workdays;
format day weekdate.;
input day : date. @@;
datalines;
01AUG09 06AUG09 11AUG09 14AUG09 19AUG09 22AUG09
27AUG09 01SEP09 04SEP09 09SEP09 12SEP09 17SEP09
;
proc timeid data=workdays print=interval;
id day;
run;
The 12 observations in the WorkDays data set are enough to determine that the DAY time ID variable is represented by the WEEKDAY12W3 interval. The WEEKDAY12W3 interval corresponds to every third day of the week excluding Sundays and Mondays. Characteristics of this interval are shown in Output 37.2.1.
Output 37.2.1: Inferred Time Interval Information
The TIMEID Procedure
| Time Interval Analysis Summary | |
|---|---|
| Time ID Variable | day |
| Time Interval | WEEKDAY12W3 |
| Base Name | WEEKDAY |
| Multiplier | 3 |
| Shift | 0 |
| Length of Seasonal Cycle | 5 |
| Time ID Format | DATE9. |
| Start | 01AUG2009 |
| End | 17SEP2009 |
Last updated: June 19, 2025