BookmarkSubscribeRSS Feed
himalayancat
Fluorite | Level 6

hello all,

I ran a proc compare 

not the exact data but mimic. but i am trying to recreate it.

 

data d1;

format x =12.5;

informat x=12.5;

x=0.39990;

run;

 

data d2;

format y =8.4;

informat y=8;

data var2;

y=0.3999;

run;

 

 

proc compare base=d1  compare=d2
outdiff outnoequal listequalvar listcompvar
listbasevar
method=absolute
criterion=0.0001
out=dboth;
run;

 

************output*****************

 

_type_var1var2
_Diff_EE
_Diff_EE
_Diff_EE
_Diff_EE

 

**my question**

 

1.i don't know how to interpret these 'E'. 

2.when does it shows up

3.does it means E =equal??

4.would proc compare results in E Instead of 0 when used with criterion=0.0001 and method=absolute

 

3 REPLIES 3
PeterClemmensen
Tourmaline | Level 20

I don't see that output at all. I see some data steps with errors in them?

 

Are you sure this is the correct code you have posted?

ballardw
Super User

@himalayancat wrote:

hello all,

I ran a proc compare 

not the exact data but mimic. but i am trying to recreate it.

 

data d1;

format x =12.5;

informat x=12.5;

x=0.39990;

run;

 

data d2;

format y =8.4;

informat y=8;

data var2;

y=0.3999;

run;

Format and Informat statements do not use the = .

data set d2 would have zero observations.

himalayancat
Fluorite | Level 6

Thank you,

i get that.appreciate it.

 

can you tell me 

what exactly does criterion does.

a=5.005

b=4.004

,say ,we ran proc compare on this,

with criterion 0.001, are we saying say to not bother the diff of 0.001 and consider it as equal???

 

and,

with exact match,

say

a=2

b=2

with proc compare it used to come 0 with exact match in the result,now it shows 'E'.

does that E means equal??

 

 

 

 

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 3 replies
  • 1255 views
  • 0 likes
  • 3 in conversation