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 now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!
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.
Ready to level-up your skills? Choose your own adventure.