Date: Fri, 21 Jan 2005 14:11:58 -0800
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: "David L. Cassell" <cassell.david@EPAMAIL.EPA.GOV>
Subject: Re: geomean questions.
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
> summary. Both geomean and gmean as a keyword have produced an error.
> Is geomean available as an additional stat? If so, what is the
> 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.
 No and no. Geometric means aren't part of the keyword set. It
available as an additional stat.
 'Close to zero' is what you get to define if you change the fuzz
If you want the geometric means of variables X1, X2, ... you can get
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,
There's an old post of mine in the SAS-L archives which has even more on
building geometric (and other) means:
If you don't use the SAS-L archives, you should. They're a great
So... Why do you need to compute geometric means anyway?
David Cassell, CSC
Senior computing specialist