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 (January 2006, week 5)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Sun, 29 Jan 2006 22:54:22 -0800
Reply-To:     David L Cassell <davidlcassell@MSN.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         David L Cassell <davidlcassell@MSN.COM>
Subject:      Re: fill in the missing values for multiple columns
In-Reply-To:  <200601291745.k0TBkLgR001361@mailgw.cc.uga.edu>
Content-Type: text/plain; format=flowed

carf4F@GMAIL.COM wrote: >I would like to ask a question about filling in the missing values for >multiple columns: > >My dataset looks like this: > > > > a > n a a a a > a n n n n > l a a a a > _ y l l l l > _ L s y y y y > N A _ s s s s > D A B 9 _ _ _ _ > O A M E 2 6 6 6 1 > b T E L 3 8 8 7 7 > s E _ _ 6 7 4 8 2 > > 1 19910102 VALUE Estimate Value . . . . . > 2 19910103 VALUE Estimate Value 0.4750 . . . . > 3 19910104 VALUE Estimate Value . . . . . > 4 19910107 VALUE Estimate Value . . . . . > 5 19910108 VALUE Estimate Value . . . . . > 6 19910109 VALUE Estimate Value . 0.5375 . . . > 7 19910110 VALUE Estimate Value . . 2.5875 . . > 8 19910111 VALUE Estimate Value . . . . . > >I wish to fill in the missing values so that it will like this: > >. >0.4750 >0.4750 >0.4750 >0.4750 0.5375 >0.4750 0.5375 2.5875 >0.4750 0.5375 2.5875

I see that you have received at least one good answer. So let me ask you a question in turn.

Why do you want to do this? What benefit are you getting from taking your data and turning it into this shape? You have ended up with a data structure which is NOT a good database design, and is NOT good for most analyses.

You have some useless variables. You are throwing away DATE, the only decent variable you have. You have variable names which are holding important data or meta-data - that's usually a bad idea. Your data table comes out looking really inefficient: you have a big table with only a couple real data points in it.

So are you *sure* this is a good idea? Wouldn't you be better off with your original data structure and a simpler approach? If you really need this, then please explain why, and what your larger goal is.

HTH, David -- David L. Cassell mathematical statistician Design Pathways 3115 NW Norwood Pl. Corvallis OR 97330

_________________________________________________________________ On the road to retirement? Check out MSN Life Events for advice on how to get there! http://lifeevents.msn.com/category.aspx?cid=Retirement


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