]> git.donarmstrong.com Git - mothur.git/blobdiff - shannon.cpp
modified some calculators and other stuff - pds
[mothur.git] / shannon.cpp
index 5045954a425db955349f1dea26ba1da18cf2f2c9..0d54b7b138d4cf861318126840f4208c2e842bca 100644 (file)
@@ -30,7 +30,7 @@ EstOutput Shannon::getValues(SAbundVector* rank){
                }
                shannon = -shannon;
     
-               double hvar = (hvara-pow(shannon,2))/(double)sampled+(double)sobs/(double)(2*sampled*sampled);
+               double hvar = (hvara-pow(shannon,2))/(double)sampled+(double)(sobs-1)/(double)(2*sampled*sampled);
     
                double ci = 0;