Hi all,
I have a table in sas with mydatetime, mydate, mytime and myreturn:
Mydate Mytime MyReturn
30Jan06 16:45:01 0.01
30Jan06 16:45:23 0.08
. . .
. . .
30Jan06 17:00:01 0.09
. . .
31Jan06 09:45:01 0.01
31Jan06 09:45:01 0.04
31Jan06 09:45:02 0.03
The table is huge and the dots just mean that the table continues.
How can I ask SAS to remove observations that have a myReturn greater than 0.05 AND that occurred within a 30 minutes interval BEFORE AND AFTER the event.
That is, in the above table, I want the transaction occurring on the 30Jan06 at 16:45:01 and 17:00:01 to be removed because (1) myReturn >0.05 AND (2) they fall within a 30 minutes interval of each other. (note: the return at 17:00:01 occurs about 15 mins after whereas the return at 16:45:01 occurs about 15 minutes before)
Many Thanks,
c+
I have a table in sas with mydatetime, mydate, mytime and myreturn:
Mydate Mytime MyReturn
30Jan06 16:45:01 0.01
30Jan06 16:45:23 0.08
. . .
. . .
30Jan06 17:00:01 0.09
. . .
31Jan06 09:45:01 0.01
31Jan06 09:45:01 0.04
31Jan06 09:45:02 0.03
The table is huge and the dots just mean that the table continues.
How can I ask SAS to remove observations that have a myReturn greater than 0.05 AND that occurred within a 30 minutes interval BEFORE AND AFTER the event.
That is, in the above table, I want the transaction occurring on the 30Jan06 at 16:45:01 and 17:00:01 to be removed because (1) myReturn >0.05 AND (2) they fall within a 30 minutes interval of each other. (note: the return at 17:00:01 occurs about 15 mins after whereas the return at 16:45:01 occurs about 15 minutes before)
Many Thanks,
c+