I use the same dataset to calculate geometric mean
STATA:
Plus, if I just give the code #gmean(m1_vol1)# it doesn't work
Excel:
first: calculate r*=1+r
second: geomean(r*)-1
I tried to use function: exp(average(ln(r))), it doesn't work
result from STATA is 0.01978; from Excel is 0.007001
BTW, the mean calculated from STATA is 0.0072096; from Excel is 0.007751
It looks that results from Excel are more reliable, does it?
I am really grateful for any help.
Best wishes,
Yanyu
STATA:
Code:
ssc install egenmore egen gmean_m1=gmean(m1_vol1)
Excel:
first: calculate r*=1+r
second: geomean(r*)-1
I tried to use function: exp(average(ln(r))), it doesn't work
result from STATA is 0.01978; from Excel is 0.007001
BTW, the mean calculated from STATA is 0.0072096; from Excel is 0.007751
It looks that results from Excel are more reliable, does it?
I am really grateful for any help.
Best wishes,
Yanyu
Comment