|
On Wed, 18 Jun 2003 17:22:20 -0700, "Michelle Jellinghaus"
<michelle@emode.com> wrote:
>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.
proc summay;
by date ;
var p1-p4;
output out=new(drop=_type_ _freq_) max=;
>
>Thank you,
>
>Michelle
>
|