Date: Mon, 29 Sep 2008 09:12:11 -0500
Reply-To: Mary <mlhoward@avalon.net>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Mary <mlhoward@AVALON.NET>
Subject: Re: how to change the form of missing value
Content-Type: text/plain; charset="iso-8859-1"
Abelian,
I must assume that your data is character data like AA, AB, BB rather than numeric data; as the usual standard for genetic numeric data is 0=Homo for Allele 1, 1=Het, 2=Homo for Allele 2.
Thus, if it is character, then you can set an array for the variables that you want to change. Hopefully they are together in your data set. If so, you can use the -- indicator to range from the first variable to the last one. Then we can do this:
data set1;
set oldset;
array snparray {*} rs9999999--rs999999; /* put in range */
do i=1 to dim(snparray);
if snparrray[i]='0' then snparray[i]=' ';
end;
run;
If your values are numeric rather than character, then your code would be this:
if snparray[i]=0 then snparray[i]=.;
-Mary
----- Original Message -----
From: Abelian
To: SAS-L@LISTSERV.UGA.EDU
Sent: Sunday, September 28, 2008 10:43 PM
Subject: how to change the form of missing value
I have a kind of genetic database.
however, some of SNP's missing value are displayed by "0".
Therefore, i can not use CaseControl to calculate any characteristic.
How can I change the "0" to be "." which replaced the missing value?
Thanks a lot
|