biocore / qiime

Official QIIME 1 software repository. QIIME 2 (https://qiime2.org) has succeeded QIIME 1 as of January 2018.
GNU General Public License v2.0
286 stars 267 forks source link

otu_category_significance fails if a category only has 1 sample #856

Open lkursell opened 11 years ago

lkursell commented 11 years ago

If you're using ANOVA to compare two groups, group A which has 4 samples vs. group B which only has a single sample, you'll get the error: File "/Users/lukeursell/bin/QIIME/qiime/pycogent_backports/test.py", line 1251, in ANOVA_one_way F = between_MS/within_MS FloatingPointError: divide by zero encountered in double_scalars

Can this be fixed by allowing just a simple t_test to be a statistical option? @clozupone

gregcaporaso commented 11 years ago

@clozupone, just wanted to make sure you saw this.

clozupone commented 11 years ago

Hey Luke,

The standard t test will also fail if there is only a single sample in category. The cogent.maths.stats.test module has a function called t_one_observation that would work. I don't know if this is a common enough use case to prioritize this over adding non-parametric correlation and ANOVA tests. It should probably return a better error message though…

Cathy

On Apr 11, 2013, at 11:42 AM, Luke Ursell wrote:

If you're using ANOVA to compare two groups, group A which has 4 samples vs. group B which only has a single sample, you'll get the error: File "/Users/lukeursell/bin/QIIME/qiime/pycogent_backports/test.py", line 1251, in ANOVA_one_way F = between_MS/within_MS FloatingPointError: divide by zero encountered in double_scalars

Can this be fixed by allowing just a simple t_test to be a statistical option? @clozupone

— Reply to this email directly or view it on GitHub.