BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
sfridy
Fluorite | Level 6

Hello!

 

I'm looking to compare observations with the same id from three datasets. I've been using:

proc compare base=ctavcm compare=ctavtrax out=cmvstraxcomp outstats=cmvstraxcompstat outbase outcomp outnoequal listobs transpose;
	by order;
	var appt rel_rsn order_sts close_rsn;
	format appt mmddyy10.;
run;

To compare two of them. And have follow up code to essentially compare pairings of the datasets. D1 to D2, D2 to D3 and D3 to D1, but am looking for a more efficient way to do this if one exists.

 

Thanks!

 

1 ACCEPTED SOLUTION

Accepted Solutions
ballardw
Super User

Are you looking for something in specific? It may be that combining the data sets and getting the source name as variable will allow calculations or summaries that at least put all 3 sets in a specific order. This would be more useful if there is a pretty much one-to-one relationship between the sets.

View solution in original post

3 REPLIES 3
ballardw
Super User

Are you looking for something in specific? It may be that combining the data sets and getting the source name as variable will allow calculations or summaries that at least put all 3 sets in a specific order. This would be more useful if there is a pretty much one-to-one relationship between the sets.

sfridy
Fluorite | Level 6

It's part of a data profiling effort. I'm trying to get an understanding of the discrepancies between the datasets.

sfridy
Fluorite | Level 6

Combining the three datasets was the perfect solution! Once combined I was able to create subsets with uncommon ids as well as perform a comparison between the IDs that existed in all three locations. Thank you!

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!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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