LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous (more recent) messageNext (less recent) messagePrevious (more recent) in topicNext (less recent) in topicPrevious (more recent) by same authorNext (less recent) by same authorPrevious page (June 2003, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Wed, 18 Jun 2003 19:10:36 -0600
Reply-To:     Jack Hamilton <JackHamilton@FIRSTHEALTH.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Jack Hamilton <JackHamilton@FIRSTHEALTH.COM>
Subject:      Re: combine incomplete observations by var
Comments: To: michelle@EMODE.COM
Content-Type: text/plain; charset=us-ascii

If those are all the variables in the data set, you could do something like this (untested):

proc summary nway missing data=in_dsn; class date; var p1 p2 p3 p4; output out=out_dsn (drop=_type_ _freq_) sum=; run;

You could use PROC REPORT instead if you also want a printout at the same time.

-- JackHamilton@FirstHealth.com Manager, Technical Development Metrics Department, First Health West Sacramento, California USA

>>> "Michelle Jellinghaus" <michelle@EMODE.COM> 06/18/2003 5:22 PM >>> I have a data set that I would like to collapse based on date.

It looks something like this right now:

date p1 p2 p3 p4 4/5/03 40 . . . 4/5/03 . 30 . . 4/5/03 . . 20 . 4/5/03 . . . 10 4/6/03 50 . . . 4/6/03 . 40 . . 4/6/03 . . 40 . 4/6/03 . . . 30

And I'd like it to look something like this:

date p1 p2 p3 p4 4/5/03 40 30 20 10 4/6/03 50 40 40 30

This would provide me with one observation per date, with a complete set of values for each variable, ridding the data set of all missing values.

Any ideas would be very much appreciated.

Thank you,

Michelle


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