| Conditions | 3 |
| Total Lines | 14 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | import scipy.stats as stats |
||
| 5 | def anova(_arg1, _arg2, *_argN): |
||
| 6 | ''' |
||
| 7 | ANOVA is a statistical hypothesis test that is used to compare |
||
| 8 | two or more group means for equality.For more information on |
||
| 9 | the function and how to use it please refer to tabpy-tools.md |
||
| 10 | ''' |
||
| 11 | |||
| 12 | cols = [_arg1, _arg2] + list(_argN) |
||
| 13 | for col in cols: |
||
| 14 | if not isinstance(col[0], (int, float)): |
||
| 15 | print("values must be numeric") |
||
| 16 | raise ValueError |
||
| 17 | _, p_value = stats.f_oneway(_arg1, _arg2, *_argN) |
||
| 18 | return p_value |
||
| 19 | |||
| 26 |