Date: Sun, 2 Nov 2008 11:45:04 -0500
Reply-To: Lou <lpogoda@HOTMAIL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Lou <lpogoda@HOTMAIL.COM>
Organization: Aioe.org NNTP Server
Subject: Re: Means
"Randy" <randistan69@HOTMAIL.COM> wrote in message
news:200811021344.mA2BmvKL012869@malibu.cc.uga.edu...
> Dear all:
> Is there a one step data process to calculate the means of the entire
> sample; and the means according to the class.
> So, for example;
>
> Class VarA
> A 20
> A 31
> B 22
> A 12
> B 4
>
> I want the mean of VarA for all the observations and according to Class A
> and Class B. I would like to do this in one data step. Is this possible?
Yes, it's possible, but it's ill advised. Generally, if there's a function
or procedure available for a particular calculation, you should use it
rather than programming it "by hand", so to speak. In this case, PROC MEANS
or PROC SUMMARY will do what you want.
|