statsmodels.sandbox.stats.multicomp.MultiComparison.tukeyhsd

MultiComparison.tukeyhsd(alpha=0.05, use_var='equal')[source]

Tukey’s range test to compare means of all pairs of groups

Parameters:
alphafloat, optional

Value of FWER at which to calculate HSD.

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. If use_var is “unequal”, then the Games-Howell pvalues are returned. This uses Welch’s t-test for unequal variances with Satterthwait’s corrected degrees of freedom for each pairwise comparison.

Returns:
resultsTukeyHSDResults instance

A results class containing relevant data and some post-hoc calculations

` The use_var keyword and option for Games-Howell test.


Last update: Jan 27, 2025