Make nan_policy defaults consistent

Should default to 'warn' always
This commit is contained in:
RunasSudo 2022-11-10 18:28:27 +11:00
parent e5833796af
commit ed67a4a610
Signed by: RunasSudo
GPG Key ID: 7234E476BF21C61A

View File

@ -217,7 +217,7 @@ class FTestResult:
return 'F({:.0f}, {:.0f}) = {:.2f}; p {}'.format(self.dof1, self.dof2, self.statistic, fmt_p(self.pvalue, PValueStyle.RELATION)) return 'F({:.0f}, {:.0f}) = {:.2f}; p {}'.format(self.dof1, self.dof2, self.statistic, fmt_p(self.pvalue, PValueStyle.RELATION))
def anova_oneway(df, dep, ind, *, nan_policy='omit'): def anova_oneway(df, dep, ind, *, nan_policy='warn'):
""" """
Perform one-way ANOVA Perform one-way ANOVA
@ -269,7 +269,7 @@ def anova_oneway(df, dep, ind, *, nan_policy='omit'):
class MannWhitneyResult: class MannWhitneyResult:
""" """
Result of a Mann-Whitney *U* test Result of a MannWhitney *U* test
See :func:`yli.mannwhitney`. See :func:`yli.mannwhitney`.
""" """
@ -395,7 +395,7 @@ class BrunnerMunzelResult:
def mannwhitney(df, dep, ind, *, nan_policy='warn', brunnermunzel=True, use_continuity=False, alternative='two-sided', method='auto'): def mannwhitney(df, dep, ind, *, nan_policy='warn', brunnermunzel=True, use_continuity=False, alternative='two-sided', method='auto'):
""" """
Perform a Mann-Whitney *U* test Perform a MannWhitney *U* test
By default, this function performs a BrunnerMunzel test if the MannWhitney test is significant. By default, this function performs a BrunnerMunzel test if the MannWhitney test is significant.
If the MannWhitney test is significant but the BrunnerMunzel test is not, a warning is raised. If the MannWhitney test is significant but the BrunnerMunzel test is not, a warning is raised.