1
votes

I have a dataset which has a variable. I could do proc freq to show following table:

proc freq

However I would like to output the observations were serumt=0.3:

data new;
set AIM12_OAW;
where serumt=0.3;
run;

I got error message as following:

NOTE: No observations were selected from data set WORK.AIM12_OAW. NOTE: There were 0 observations read from the data set WORK.AIM12_OAW.WHERE serumt=0.3;

I tried

where serumt=0.21

still no observations. The weird thing was if I did

where serumt=0.12

it would output one observation (should be 6).

If I did

proc freq data=aim12_onw;
table serumt;
by serumt;
run;

The output would be:

proc freq2

I cannot understand why the variable serumt could not be selected by where or if statement.

I did check the format of serumt. It looks normal for me.

format

I have no idea how to deal with this variable. Thank you so much for comments.

1

1 Answers

1
votes

Sounds like it might be a floating point precision issue - try something like

where round(serumt,0.01) = 0.30.