Date: Tue, 17 Mar 2009 13:40:47 -0500
Reply-To: "./ ADD NAME=Data _null_;" <iebupdte@GMAIL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: "./ ADD NAME=Data _null_;" <iebupdte@GMAIL.COM>
Subject: Re: how to substitute a missing value with previous record?
In-Reply-To: <941871A13165C2418EC144ACB212BDB0BEB338@dshsmxoly1504g.dshs.wa.lcl>
Content-Type: text/plain; charset=ISO-8859-1
V9 not that many years.
On 3/17/09, Nordlund, Dan (DSHS/RDA) <NordlDJ@dshs.wa.gov> wrote:
> > -----Original Message-----
> > From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of
> > Peter Crawford
> > Sent: Tuesday, March 17, 2009 10:54 AM
> > To: SAS-L@LISTSERV.UGA.EDU
> > Subject: Re: how to substitute a missing value with previous record?
> >
> > i like the smallest.
> > data better ;
> > drop previous;
> > previous = value ;
> > set original ;
> > value= coalesce( value, previous);
> > run;
> >
> >
> Peter,
>
> That is a nice solution. Is coalesce() relatively new to the data step (I have used it in proc sql), or have I just been woefully unaware all these years?
>
> Dan
>
> Daniel J. Nordlund
> Washington State Department of Social and Health Services
> Planning, Performance, and Accountability
> Research and Data Analysis Division
> Olympia, WA 98504-5204
>
|