LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (December 2010, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Fri, 3 Dec 2010 15:05:34 -0500
Reply-To:     Joe Zhou <g75wez1@GMAIL.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Joe Zhou <g75wez1@GMAIL.COM>
Subject:      Replacing missing values by the previous non-missing value

Hello all,

I need your SAS expertise in terms of replace the missing values by using their previous non-missing values within a group.

Have a data like:

data have; input q1 q2 q3 q4; cards; 1 1 1 10 . . 2 11 . 2 1 200 . . 2 201 2 1 1 100 . . 2 101 . 2 1 2000 . . 2 2001 ;

Wanted data: 1 1 1 10 1 1 2 11 1 2 1 200 1 2 2 201 2 1 1 100 2 1 2 101 2 2 1 2000 2 2 2 2001

Thank you very much for your helps.

Joe


Back to: Top of message | Previous page | Main SAS-L page