Date: Thu, 1 May 2008 16:18:55 -0500
Reply-To: Citam <citam.sasl@GMAIL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Citam <citam.sasl@GMAIL.COM>
Subject: Re: manipulation/transposition question
Content-Type: text/plain; charset=ISO-8859-1
On 5/1/08, Theorbo <firstname.lastname@example.org> wrote:
> Hi. I have a dataset like this:
> ID, MONTH, DAY, MeasureA, MeasureB, MeasureC
> with multiple observations per ID, month and day. I have about 25 of these
> measures - all numeric.
> I am trying to get to this output dataset (to dump into Excel - don't get me
> ID, Avg_A_Month1, Avg_B_Month1, Avg_C_Month1, Avg_A_Month2, Avg_B_Month2
> where I have one observation per ID with averages for the measures
> aggregated by month.
> I know it's not good to keep my "data" in the variable names - isn't that
> What's the best way for me to get from start to output?
> I started by trying to do a proc means nway noprint, class month, out= ...
> and then transposing the output dataset but then I'm left with one variable
> that contains all the variable names. Do I need to transpose twice?
> Any ideas? Thanks for any tips or suggestions - no code necessary.
The MEANS procedure wrapped inside the HTML output of ODS, which can
be directly opened in Excel and saved as a .xls file?