statsmodels.stats.multicomp.pairwise_tukeyhsd¶
-
statsmodels.stats.multicomp.pairwise_tukeyhsd(endog, groups, alpha=
0.05
, use_var='equal'
)[source]¶ Calculate all pairwise comparisons with TukeyHSD or Games-Howell.
- Parameters:¶
- endog
ndarray
,float
, 1d response variable
- groups
ndarray
, 1d array with groups, can be string or integers
- alpha
float
significance level for the test
- use_var{“unequal”, “equal”}
If
use_var
is “equal”, then the Tukey-hsd pvalues are returned. Tukey-hsd assumes that (within) variances are the same across groups. Ifuse_var
is “unequal”, then the Games-Howell pvalues are returned. This uses Welch’s t-test for unequal variances with Satterthwaite’s corrected degrees of freedom for each pairwise comparison.
- endog
- Returns:¶
- results
TukeyHSDResults
instance
A results class containing relevant data and some post-hoc calculations, including adjusted p-value
- results
See also
MultiComparison
tukeyhsd
statsmodels.sandbox.stats.multicomp.TukeyHSDResults
` The use_var keyword and option for Games-Howell test.
Last update:
Feb 19, 2025