I've got some troubles with the pingouin function welch_anova.
My test DataFrame:
age categ
0 44 0
1 21 2
... ... ...
336811 52 1
336812 30 0
336813 53 0
336814 27 2
336815 53 0
[336713 rows x 2 columns]
I run a ANOVA:
aov = pg.anova(data=df_test, dv="age", between="categ", detailed=True)
print(aov)
Source SS DF MS F p-unc np2
0 categ 7.320873e+06 2 3.660437e+06 22711.788769 0.0 0.118868
1 Within 5.426722e+07 336710 1.611690e+02 NaN NaN NaN
Because my homoscedasticity test fail:
homog_var = pg.homoscedasticity(data=df_sales, dv='age', group='categ')
print(homog_var)
W pval equal_var
levene 13053.244984 0.0 False
I need to run a Welch_ANOVA:
aov = pg.welch_anova(data=df_test, dv='age', between='categ')
print(aov)
Source ddof1 ddof2 F p-unc np2
0 categ 2 49283.143894 34495.8422 0.0 0.118868
Wich seems ok but I got an index error in console:
IndexError: single positional indexer is out-of-bounds
I don't get this error without the welch_anova function
My DF is clean (no NAN values)
I've try with other DF and get the same issue.
Thanks in advance for any idea that could solve this.
question from:
https://stackoverflow.com/questions/65880693/python-pingouin-wech-anova-indexer-is-out-of-bounds 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…