06-07-2012 03:33 AM
These data are first transformed in log10.
Then I do the arithmetic mean of these log10 values and then i do the exponential of the arithmetic mean.
Do you confirm I am right?
(I find very different values from arithmetic mean so I am not sure I do the calculation correclty).
Moreover, someome told me that I should do GM = exponential of the arithmetic mean * log(10) (log function is the natural logarithm in SAS) and not just GM = exponential of the arithmetic mean
Thanks.for your help
06-08-2012 04:56 AM
Thanks for your reply.
Just to clarify, if I do 10**(mean_of_log_values), it is not equal to log(10)*exp(mean_of_log_values).
I found the same result if I do exp(mean_of_log_values * log(10).
So, what is the good formula?
06-08-2012 05:48 AM
Let X = mean of log10 values.
Then geometric mean = 10**X
OR geometric mean = exp(log(10)*X), where log is the natural log of 10 = 2.303 (approximately).
If the variables in question are x1 to xN, then Ksharps recommendation of geomean(x1, x2,..., xN) is the way to go. Note that this is invalid for any x less than zero, and returns zero if any of the x's are equal to zero. This may require transposing the data if the x values are on separate records.