Resources

Examining a Weekly Time ID Variable


/*--------------------------------------------------------------

                    SAS Sample Library

        Name: tidex01.sas
 Description: Example program from SAS/ETS User's Guide,
              The TIMEID Procedure
       Title: Examining a Weekly Time ID Variable
     Product: SAS/ETS Software
        Keys: TIME ID
        PROC: TIMEID
       Notes:

--------------------------------------------------------------*/

ods graphics on;

data triweek;
   format date date.;
   input date : date. @@;
datalines;
28DEC48 18JAN49 08FEB49 01MAR49 22MAR49 12APR49 03MAY49 24MAY49
17JUN49 05JUL49 26JUL49 16AUG49 06SEP49 27SEP49 18OCT49 08NOV49
29NOV49 20DEC49 10JAN50 04FEB50 21FEB50 14MAR50 04APR50 25APR50
16MAY50 06JUN50 27JUN50 18JUL50 08AUG50 29AUG50 19SEP50 10OCT50
31OCT50 21NOV50 12DEC50 02JAN51 23JAN51 13FEB51 06MAR51 27MAR51
17APR51 08MAY51 29MAY51 19JUN51 10JUL51 31JUL51 21AUG51 11SEP51
02OCT51 23OCT51 13NOV51 04DEC51 25DEC51 15JAN52 05FEB52 26FEB52
20MAR52 08APR52 29APR52 20MAY52 10JUN52 01JUL52 22JUL52 12AUG52
02SEP52 23SEP52 14OCT52 04NOV52 25NOV52 16DEC52 06JAN53 27JAN53
17FEB53 31MAR53 21APR53 12MAY53 12MAY53 02JUN53 23JUN53 14JUL53
04AUG53 25AUG53 25AUG53 15SEP53 06OCT53 31OCT53 31OCT53 17NOV53
08DEC53 29DEC53 19JAN54 09FEB54 02MAR54 23MAR54 13APR54 04MAY54
25MAY54 15JUN54 06JUL54 27JUL54 17AUG54 28SEP54 19OCT54 09NOV54
30NOV54 21DEC54 16JAN55 01FEB55 22FEB55 15MAR55 05APR55 26APR55
17MAY55 07JUN55 28JUN55 19JUL55 09AUG55 30AUG55 20SEP55 11OCT55
01NOV55 22NOV55 13DEC55 03JAN56 24JAN56 14FEB56 06MAR56 27MAR56
08MAY56 29MAY56 19JUN56 10JUL56 31JUL56 31JUL56 21AUG56 11SEP56
23OCT56 13NOV56 13NOV56 04DEC56 25DEC56 05FEB57 26FEB57 19MAR57
;

proc timeid data=triweek print=all plot=all;
  id date interval=week3;
run;