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 (May 2005, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Mon, 9 May 2005 09:50:32 -0700
Reply-To:     Yiyu <shenyiyu@GMAIL.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Yiyu <shenyiyu@GMAIL.COM>
Organization: http://groups.google.com
Subject:      fill each group with continuous numbers
Comments: To: sas-l@uga.edu
Content-Type: text/plain; charset="iso-8859-1"

I have a data set like this:

Date Permno Signal 19900101 19383 1 19900101 29304 0 19900101 29590 0 ........ 19900102 29340 0 19900102 29584 1 19900102 99999 1 ........

I know the maximum possible value of permno is 99999, and for each date group I want to fill it with obs with continuous values of permno from 1 to 99999, if the permno is in the original data set then the original obs is kept, if it's not then the value is set to missing. So for each date there are exactly 99999 obs and it looks like:

Date Permno Signal 19900101 1 . 19900101 2 . ........ 19900101 19383 1 19900101 19384 . ........ 19900101 99999 .

19900102 1 . 19900102 2 . ........ 19900102 99999 1

What's the most simple way to do it? and the most efficient way?

Thank you very much.

Yiyu


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