Hi Tom: Sorry for not getting back earlier in the day. This is a trading data set and there are multiple observations for other variables on a particular date. The study is an event study where the window opens some days prior to the event and shuts some days after the event. The event date is flagged as VarA = 1 and VarB = 1. For a normal event study the code is simple (from the SA s Boards) data want;
x='15JAN2019'd;
fivedaysprior = intnx('day',x,-5);
twodaysafter = intnx('day',x,2);
format x fivedaysprior twodaysafter date9.;
run; But what is complicating is that there are multiple events and multiple observations of other variables on the same day. Does anyone have any suggestions? Randy
... View more