BookmarkSubscribeRSS Feed
Mikeyjh
Calcite | Level 5

Hi all,

I have a general question abour proc compare.

Is the output from proc compare correct when there is no row level unique id associated with the data but I do use a non-unique column as the ID? For example, if I have an Adverse Event dataset where there is no unique id defined but I use subject number as the ID - is the result of using subject number as the ID dependable? I can also manufacture an ID based on subject number,AE text and start date but this is not guarenteed to be unique 100% of the time.

Is there a way to create an ID across both base/compare datasets to resolve this problem?

3 REPLIES 3
data_null__
Jade | Level 19

If you are doing QC of ADaM data for example use NO ID variable.  You should be able to create exact duplicate of ADAE and compare row by row.

Mikeyjh
Calcite | Level 5

Is "NO ID" an option or do you mean dont use an ID at all ? Smiley Happy

If no ID is defined how does the compare work?

data_null__
Jade | Level 19

Don't use ID statement.  PROC COMPARE will compare record by record as if you said ID _N_; sort of.

If you are doing what I think you are, QCing ADaM data, I would use record level compare.  No ID statement.

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

What is Bayesian Analysis?

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.

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
  • 813 views
  • 0 likes
  • 2 in conversation