statsmodels.sandbox.stats.multicomp.MultiComparison.dunnett_t3#

MultiComparison.dunnett_t3(alpha=0.05)[source]#

Dunnett’s T3 test to compare means of all pairs of groups

Pairwise comparisons that do not assume equal variances across groups. Each pair is compared with Welch’s t statistic using Satterthwaite’s degrees of freedom for that pair. The p-values and the simultaneous confidence intervals are based on the studentized maximum modulus distribution for the number of pairwise comparisons.

Parameters:
alphafloat, optional

Value of the family-wise error rate. Default is 0.05.

Returns:
resultsTukeyHSDResults

A results class containing the mean differences, adjusted p-values, simultaneous confidence intervals and reject decisions. q_crit contains the critical value of the studentized maximum modulus distribution for each pair, on the scale of the t statistic. plot_simultaneous is not available for these results.

Raises:
TypeError

If alpha is not a float.

ValueError

If alpha is not in the interval (0, 1).

See also

tukeyhsd

Tukey HSD and Games-Howell pairwise comparisons.

Notes

Dunnett’s T3 [1] is recommended for small samples with unequal variances, where Games-Howell can be liberal.

The Welch t statistics of the pairs are correlated. Dunnett’s T3 approximates their joint distribution with the studentized maximum modulus distribution, which has independent components, so the test is conservative.

The critical values are computed using the degrees of freedom of each pair without rounding. dunnettT3Test in the R package PMCMRplus rounds the degrees of freedom to integers, so its p-values differ, especially if the degrees of freedom are small.

Pairs with undefined statistics, for example the pairs of a group with a single observation or of two groups with zero variance, have nan p-values and confidence intervals. They are kept in the number of comparisons of the studentized maximum modulus distribution, which is conservative.

Added in version 0.15.1.

References

[1]

Dunnett, C. W. (1980). Pairwise Multiple Comparisons in the Unequal Variance Case. Journal of the American Statistical Association, 75(372), 796-800.