嗯。所以,一般计算geomean的方法:
先对观测(y)取log, ln_y=log(y);
然后对ln_y求其mean,
然后exp(mean)即为geomean.
*******SAS CODE***********;
data a1;
set a;
ln_y=log(y);
run;
proc means data=a1;
var ln_y;
output out=out1 mean=mean;
run;
data out2;
set out1;
geomean=exp(mean);
run;