Date: Fri, 8 Aug 2008 08:03:12 -0400
Reply-To: Gerhard Hellriegel <gerhard.hellriegel@T-ONLINE.DE>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Gerhard Hellriegel <gerhard.hellriegel@T-ONLINE.DE>
Subject: Re: Format question
On Fri, 8 Aug 2008 00:21:19 GMT, Lou <lpogoda@VERIZON.NET> wrote:
>"sas biology" <sasbio@GMAIL.COM> wrote in message
>> Hi Group,
>> I am working on a old dataset which has a variable SEX with format sex.
>> This variable has values 1 and 2. Is there anyway I can know if the
>> of 1=Male or female? Please let me know.
>I've run across this situation many times, and I always assume that 1 =
>Daily and 2 = Never.
>In order to find out what it really means, the surest way is to find the
>format catalog intended to be used with the dataset. Or to find the
>that wrote the format originally. Or maybe to find the programmer who
>the program and ask. Or find the documentation for the dataset, assuming
>anyone documented it in the first place.
>Failing that, you might find something else in the data that would tilt
>probabilities one way or the other. For instance, if a person of sex 1
>diagnosed with prostate cancer, I'd tend to assume that 1 = Male.
>Similarly, if someone of sex 2 had a pregnancy test, better yet a positive
>result on a pregnancy test, I'd bet that 2 = Female. Occasionally, you'll
>have a dataset with both coded and uncoded values in it - variable SEX
>be 1 or 2 while variable SEX_ is Male or Female.
>Sometimes, the decoding is in the variable label - the label could read
>something like "Sex 1=Male 2=Female".
>Failing all of the above, you're never going to know for sure.
should be not too hard to find it out.
SEX. is a user format. It must be located in a format library, which is
allocated. Look for the libname LIBRARY. If there is one, you've found the
place maybe. To be sure, that there is no other, look for the option
As soon as you have found the right format-catalog, you should use:
proc format cntlout=x library=the_lib.the_catalog;
In the dataset x you can subset with:
and in the start/end - label combination you'll find the information about
(If you don't find the right catalog, just open all of them and look for
the format SEX. You see the format name, but you can't see the details.
Perhaps in a future release?)