Date: Wed, 5 May 2004 23:04:31 -0400
Reply-To: Howard Schreier <Howard_Schreier@ITA.DOC.GOV>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Howard Schreier <Howard_Schreier@ITA.DOC.GOV>
Subject: Re: Calculate medians for individual observations!
There is more than one way to transpose.
Suppose that there are 100K observations and 50 variables. Transposing to
50x100K would likely not work.
But one could create a DATA step view which would transpose each
observation from 1x50 to 50x1. There would be 100K of these, or 5 million
observations in all; but remember it's a view, so there's no disk footprint.
Run PROC SUMMARY with a CLASS or BY statement (or both, to process large
chunks) to generate the medians.
Merge the results with the original data.
On Wed, 5 May 2004 14:20:23 -0400, Puhong Gao <pgao@ATT.NET> wrote:
>Thanks much to all for your inputs. Robin's suggestion, using the ORDINAL
>function, works perfectly for my need.
>Because my dataset has more than 20k observations, it is very clumsy to
>transpose them. And it is too bad that there is no MEDIAN function for data
>step. Still don't understand why there isn't one.