Hi I have a table that I need to determine the min and max time of 2 or 3 data time points...that is limited within hour of each point if it's greater I excluded
my data looks like this
id. Number. Start time. End time
1a. 23. 01/01/16. 11:01:00. 01/01/16 11:05:11
1a. 24. 01/01/16 11:02:00. 01/01/16 11:06:16
1a. 25. 01/01/16. 12:00:00. 01/0116 12:07:00
what I need here is just number 23 and 24 sine they over lap the 25 it exceeds the hour from the first 2 ....I would need 23 and 24 in one roll
id. Number. Start time. End time. Id. Number. Start time. end time
1a. 23. 01/01/16. 11:01:00. 01/01/16 11:05:11. 1a 24 01/01/16. 11:02:00. 01/01/16 11:06:16
I would need the min start time of number and max end time from number first
thanks in advance
And if there was 4 overlap how would you want it to look like? Each entry into a group?
You can use the lag function to create groups and determine if there's an overlap. Once your groups are assigned you can then use various transpose mechanisms to transpose your data.
Can you have multiple overlaps?
What happens when there's no overlaps?
What do you want the final dataset to look like for all records, include only overlaps?
And if there was 4 overlap how would you want it to look like? Each entry into a group?
You can use the lag function to create groups and determine if there's an overlap. Once your groups are assigned you can then use various transpose mechanisms to transpose your data.
Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.
If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website.
Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.
Find more tutorials on the SAS Users YouTube channel.