Posted by: shivanagar October 21, 2009
Any SAS expert here ?
Login in to Rate this Post:     0       ?        
The questions seems quite tricky, or unsolvable in itself.

You are saying that you have a huge data and asked to find the missing code?? So, where comes SAS here, the data is raw, its upon those guys who wrote data in any format. As you said youself it could be anything like ".", "-99", yeas, very true. So, if u have to import data in SAS,u need to say in statement that missing data is "this". but, u r trying to find missing data using SAS. ............oops..........

What about looking into the data (well part of data) for something that does not look like what should have been manually, or with some code. If you are going to analyze the data, u should know that what values you expect i.e 1-100, or some numeric, positive. if u know that u can select the data thats reading(or delete that's coded). for example, i made a dummy data

data hello;
do a=1 to 100;
b=ranuni(0);
output;
end;
run;

Now, i replaced some with some missing code;
data hello2; set hello;
if a=50 then a=-99;
if (b<0.5 and b>0.4) then b=".";

run;

Now, only data that does not fit in what I expect, could be missing

data hello3; set hello2;
where a<0;
run;


or coding what could be missing to my code,"."

data hello4; set hello2;
if a<0 then a="NA";

run;



I don't know whether it helps you or not...but this is definitely what I will do.


Read Full Discussion Thread for this article