Re: Need to replace missing values with zeros in a varying number of rows and varying number of columns #2

It's a little hard to be sure without seeing sample data, but it seems to
me that David does not want all missing values converted to zero, but only
those corresponding to the current and previous dates.

Suppose there are three days. On the first day, expected progress occurs.
On the second day, failure to progress. On the third day, catchup and
completion. So the dataset looks like

 C b b
 C b b
 C C C

where "C" represents completion "b" a blank. My sense is that David wants

 C b b
 C 0 b
 C C C

rather than

 C 0 0
 C 0 0
 C C C

I suggest using an array and a loop, with the termination of the loop
computed in terms of the "current" day.

On Tue, 8 Jun 2004 08:24:15 -0700, Terjeson, Mark <TERJEM@DSHS.WA.GOV>

>Hi David,
>This handy option helps.
>option missing=0;
>data test;
>    a = .;
>    b = 1;
>Hope this is helpful,
>Mark Terjeson
>Reporting, Analysis, and Procurement Section
>Information Services Division
>Department of Social and Health Services
>State of Washington
>-----Original Message-----
>From: David Fickbohm [mailto:DavidF@HOMEGAIN.COM]
>Sent: Tuesday, June 08, 2004 8:13 AM
>Subject: Need to replace missing values with zeros in a varying number of
>rows and varying number of columns
>I am working in PC SAS v8.1
>I have a program that finds the number of times a varying number of people
>get a document to different levels of completeness.  The program displays
>this information from the beginning of the current month to the current
>Using a separate column for each day. So as the month continues the number
>of days(columns) increases.  If person A does not get a document to level 2
>completeness on a certain day the field currently is blank.  The user would
>like the report to display zeros instead of blanks.  I create the report in
>SAS and then export the final report to the user in Excel.
>Can someone please point me in the right direction on changing all of the
>missing values (.) to zeroes ?
>Dave Fickbohm
>Data Mining Analyst
>2450 45th St.
>Emeryville, CA, 94608
>Phone 510 655 0800 ext 4151
6/11/2004 1:29:58 PM
comp.soft-sys.sas 142828 articles. 3 followers. Post Follow

0 Replies

Similar Articles

[PageSpeed] 11