when I use proc compare to compare 2 data sets AND everything is 100% the same,
I still get output because I use the ID statement
how can I avoid this??
@Jaheuk wrote:
when I use proc compare to compare 2 data sets AND everything is 100% the same,
I still get output because I use the ID statement
how can I avoid this??
What does your log show?
ID does not "cause" this. Example:
proc sort data=sashelp.class out=work.class1; by name; run; proc sort data=sashelp.class out=work.class2; by name; run; proc compare data=work.class1 compare=work.class2 outnoequal out=work.compare method=absolute criterion=0.5; id name; run;
Which in my log:
NOTE: There were 19 observations read from the data set WORK.CLASS1. NOTE: There were 19 observations read from the data set WORK.CLASS2. NOTE: The data set WORK.COMPARE has 0 observations and 7 variables. NOTE: PROCEDURE COMPARE used (Total process time): real time 0.00 seconds cpu time 0.00 seconds
So an ID statement does not cause any issue.
So one questions the claim of "100% the same".
You might try removing the NOPRINT option and seeing what specific values are being reported as unequal.
For example if I modify the weight value for Alice in the above example I get a table like:
Value Comparison Results for Variables __________________________________________________________ || Base Compare Name || Weight Weight Diff. % Diff ________ || _________ _________ _________ _________ || Alice || 99.0000 84.0000 -15.0000 -15.1515 __________________________________________________________
Which shows which specific value for the ID variables has a difference.
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.