Question about centered log-ratio transformation
Closed this issue · 2 comments
li000678 commented
Hi Thom,
I noticed that in the scripts we are using 'rowMeans' to compute log-ration transformed data.
Lines 161 to 162 in 2bd7c44
This 'rowMeans' seems to me that it is calculating the algorithmic means instead of the geometric means mentioned in the article. Is this actually the case or I am misinterpreting it?
tpq commented
You are correct that we use rowMeans, but they are the rowMeans of log data.
The arithmetic mean of the logs is the log of the geometric means!
Consider the mean between two variables,
(log(a) + log(b)) / 2
= log(ab)/2
= log(sqrt(ab))
li000678 commented
Now I get it, thanks a lot!