moroche wrote:Tom,
I have version 7 of RATS.
I have a seven day dataset with observations per minute - 1440 per day from 2001/01/01 to 2006/12/31.
I have set the calender command as cal(7,ppd=1440) 2001 01 01
How can I select a sample that ignores the data from 9pm on Friday to 9pm on Sunday?
This would set up the dummy to exclude those periods.
- Code: Select all
compute ninepm=21*60+1
set smpl = %weekday(t)<=4.or.$
%weekday(t)==5.and.%period(t)<ninepm.or.$
%weekday(t)==7.and.%period(t)>=ninepm
%period returns the period within the day and %weekday returns
the day of the week of the entry (1=Monday, so 5=Friday and
7=Sunday).