Date: Thu, 1 Sep 2005 13:59:01 -0400
Reply-To: Arthur Tabachneck <art297@NETSCAPE.NET>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Arthur Tabachneck <art297@NETSCAPE.NET>
Subject: Re: Explanation of missing values
Content-Type: text/plain; charset=ISO-8859-1
On Thu, 1 Sep 2005 13:38:36 -0400, Bernie Zimmerman <beezee@EROLS.COM>
wrote:
Bernie,
Yes, I too would expect the silhdro variable to receive a value of zero
when brand is missing, but a comment in your code causes me to think that
you're not showing all of the code.
' /* create "silhydro" var. for older months, 8/10/2005 */ ' leads me to
think that there was another if statement, before the one which created
silhydro, namely one which limited which records would be subject to the
logic. If that is indeed the case, then those records which weren't
selected would get missing values for that variable.
Art
-------
>I am running a Proc FREQ on a variable in a SAS dataset and getting
strange
>(to me at least) results. The dataset contains 27,408 records. Here is
the
>output from Proc FREQ:
> Cumulative Cumulative
>SILHYDRO Frequency Percent Frequency Percent
>ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒ
> 0 13943 80.35 13943 80.35
> 1 3409 19.65 17352 100.00
>
>Frequency Missing = 10056
>
>The variable 'silhydro' is created in a data step as follows:
> /* create "silhydro" var. for older months, 8/10/2005 */
> if brand in (2454, 2579, 2586, 3014, 3015, 3016) then silhydro=
1 ;
> else silhydro= 00 ;
>
>My questions: 1) even if 'brand' is missing for some observations,
shouldn't
>that go to the "else" and set 'silhydro' to zero and 2) would it matter if
>'silhydro' already existed as a variable on the input dataset?
|