Exemple #1
0
def _welch_anova(self, dv=None, between=None, export_filename=None):
    """Return one-way Welch ANOVA."""
    aov = welch_anova(data=self,
                      dv=dv,
                      between=between,
                      export_filename=export_filename)
    return aov
Exemple #2
0
 def test_welch_anova(self):
     """Test function welch_anova."""
     # Pain dataset
     df_pain = read_dataset('anova')
     aov = welch_anova(dv='Pain threshold', between='Hair color',
                       data=df_pain, export_filename='test_export.csv')
     # Compare with R oneway.test function
     assert aov.loc[0, 'ddof1'] == 3
     assert np.allclose(aov.loc[0, 'ddof2'], 8.330)
     assert np.allclose(aov.loc[0, 'F'], 5.890)
     assert np.allclose(np.round(aov.loc[0, 'p-unc'], 4), .0188)
Exemple #3
0
 def test_welch_anova(self):
     """Test function welch_anova."""
     # Pain dataset
     df_pain = read_dataset('anova')
     aov = welch_anova(dv='Pain threshold', between='Hair color',
                       data=df_pain).round(4)
     # Compare with JASP
     assert aov.at[0, 'ddof1'] == 3
     assert aov.at[0, 'ddof2'] == 8.3298
     assert aov.at[0, 'F'] == 5.8901
     assert aov.at[0, 'p-unc'] == .0188
     assert aov.at[0, 'np2'] == 0.5760