X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=shannon.cpp;fp=shannon.cpp;h=0d54b7b138d4cf861318126840f4208c2e842bca;hb=e4827e0945cbda536064e5a345996b2a7dfcbb81;hp=5045954a425db955349f1dea26ba1da18cf2f2c9;hpb=d59f91eb1230d2c7867a92cb86138b7003100ab4;p=mothur.git diff --git a/shannon.cpp b/shannon.cpp index 5045954..0d54b7b 100644 --- a/shannon.cpp +++ b/shannon.cpp @@ -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;