07-18-2016 01:26 PM
I have to divide transaction data into ten minute intervals and then run a regression for the data of each interval. So for each time t, for example 18JUN2016, I have the respective transaction volume and price change. I was trying the following:
id time interval=MINUTE10.
Which didn't lead to a result. I wanted to, firstly, "cut off" the data for the first 10min interval to later run a regression.
I'm grateful for every hint!
07-18-2016 02:23 PM
Assuming you have a time variable, look at the round function.
Time is represented in seconds so ten minutes is 600
roumd(var,600) will group your data into 10 minute intervals.
07-18-2016 02:41 PM
18JUN2016 looks more like a SAS date than a SAS time or a SAS datetime, but, of course, it could be a SAS datetime value, formatted as a date.
Assuming those times are SAS datetimes, you can assign them to the center of 10 minute bins with:
data myData10min; set myData; time10min = intnx("minute10.", time, 0, "MIDDLE"); run;