BookmarkSubscribeRSS Feed
Courtney-GOV
Calcite | Level 5

I have a dataset where we measured a variable with two different systems (visual observations and an automatic system). How can I determine which are matching pairs based on date, time and duration of the activity? 

Thank you,

Courtney 

2 REPLIES 2
art297
Opal | Level 21

Can you provide examples of the two datasets and the criteria you'd like to use to match records?

 

Art, CEO, AnalystFinder.com

ballardw
Super User

Will the date and time be exactly the same in both systems? Will the duration be the same in both systems?

Will either data set have observations within the set that overlap in time?Example: Obs 1 has 12/20/2015 12:00:00 duration 1 hour and obs 2 has 12/20/2015 12:15:00 duration 50 minutes. So obs 2 overlaps obs 1.

 

To allow use of all of the SAS functions involving dates and time it sounds like you may want to make one datetime variable for the start time and a second for the end time as start datetime + duration (in seconds). Then you will be able to test if, or join where, one value is between the others, and possibly within some interval if there is overlapping data involved.

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

How to choose a machine learning algorithm

Use this tutorial as a handy guide to weigh the pros and cons of these commonly used machine learning algorithms.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 2 replies
  • 794 views
  • 0 likes
  • 3 in conversation