On 5/1/08, Theorbo <email@example.com> 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?