Date: Fri, 21 Jan 2005 14:11:58 -0800
Reply-To: cassell.david@EPAMAIL.EPA.GOV
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: "David L. Cassell" <cassell.david@EPAMAIL.EPA.GOV>
Subject: Re: geomean questions.
In-Reply-To: <OFBBEB45E1.59FFAAD6-ON85256F90.0073CA50-85256F90.00745C24@epamail.epa.gov>
Content-type: text/plain; charset=US-ASCII
Carry Croghan/RTP/USEPA/US@EPA wrote:
> I have a couple of questions concerning geomean.
>
> 1. I had thought that geomean was available with proc means and/or
proc
> summary. Both geomean and gmean as a keyword have produced an error.
> Is geomean available as an additional stat? If so, what is the
keyword?
>
> 2. The note in SAS help says that there is a fuzz factor used for when
> the variable is 0 or close to 0. Does any one know what that fuzz
> factor is or what close to 0 is defined as?
>
>
> I guess technically this is four questions in a couple of areas.
Hey, you work for ORD too! Small world.
Okay:
[1] No and no. Geometric means aren't part of the keyword set. It
isn't
available as an additional stat.
[2] 'Close to zero' is what you get to define if you change the fuzz
factor.
If you want the geometric means of variables X1, X2, ... you can get
them
through a sneaky trick I learned from an old post of Nat Wooding:
proc sql noprint;
create table YourGeoMeans as
select exp(mean(log(x1))) as g_x1,
exp(mean(log(x2))) as g_x2,
.....
from YourData;
quit;
There's an old post of mine in the SAS-L archives which has even more on
building geometric (and other) means:
http://www.listserv.uga.edu/cgi-bin/wa?A2=ind0109C&L=sas-l&P=R18556
If you don't use the SAS-L archives, you should. They're a great
resource.
So... Why do you need to compute geometric means anyway?
David
--
David Cassell, CSC
Cassell.David@epa.gov
Senior computing specialist
mathematical statistician