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-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!

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.

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
  • 948 views
  • 0 likes
  • 3 in conversation