Date: Thu, 4 Dec 2003 09:58:35 -0800
Reply-To: "Choate, Paul@DDS" <pchoate@DDS.CA.GOV>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: "Choate, Paul@DDS" <pchoate@DDS.CA.GOV>
Subject: Re: Aggregate
Hi Frank -
Doesn't it depend on the task? One might want many parameters describing
the distributions of the data being collapsed. There is sufficient
information (_freq_) in the output to recreate either the sum or the mean if
the other has been created, so sum and mean are interchangeable pieces of
information.
In William's case he mentioned day and time. If anything, as you point out,
days would probably be averaged, whereas time might be summed or averaged
depending on whether it is time of day, or time length of an event. I meant
to suggest a method, not a particular choice of statistic. I included the
suggestion on splitting the data into two tables of higher normal form in
case William didn't want to lose any information. Thanks for prompting the
clarification!
Regards -
Paul Choate
DDS Data Extraction
(916) 654-2160
-----Original Message-----
From: Frank Liu [mailto:fql@timberline.ca]
Sent: Thursday, December 04, 2003 9:11 AM
To: Choate, Paul@DDS
Cc: SAS-L@LISTSERV.UGA.EDU
Subject: Re: Aggregate
Paul,
Would the "sum=" being dangerous there? I thought mean= would be better.
Frank
"Choate, Paul@DDS" wrote:
> Hi William,
>
> You can also use proc summary with the nway option if you'd like to sum or
> average any analysis variables in your data.
>
> Proc Summary data=stuff nway;
> Class <unique key variables>;
> Id <other constant id variables>;
> Var <variables to sum>;
> Output sum= out=newstuff;
>
|