Skip to main content

Module posthoc

Module posthoc 

Source
Expand description

The studentized range distribution and Tukey’s honestly significant difference test (SciPy’s studentized_range and tukey_hsd).

See the book entry Multivariate distributions and further tests.

Structs§

StudentizedRange
The distribution of Q = (max − min)/S for k independent standard normal deviates and an independent S = √(χ²_ν / ν) (SciPy’s studentized_range(k, df)): F(q) = ∫₀^∞ f_S(s) W(qs) ds, with the distribution of the range W(w) = k ∫ φ(z) (Φ(z) − Φ(z − w))^{k−1} dz and f_S(s) = ν^{ν/2} s^{ν−1} e^{−νs²/2} / (Γ(ν/2) 2^{ν/2−1}). Both integrals are evaluated by composite Gauss-Legendre quadrature (the inner over |z| ≤ 8.5, the outer over the part of s holding all but 10⁻¹⁷ of its mass); df = ∞ gives the range of standard normals itself.
TukeyHsdResult
The result of tukey_hsd: entry (i, j) compares treatment i with treatment j.

Functions§

tukey_hsd
Tukey’s honestly significant difference test of all pairwise differences of means (SciPy’s tukey_hsd): |x̄_i − x̄_j| / se_ij against the studentized range with k treatments, where se_ij = √(MSE (1/n_i + 1/n_j) / 2) with the pooled variance and N − k degrees of freedom (the Tukey-Kramer form), or, with equal_var = false, the Games-Howell form se_ij = √((s_i²/n_i + s_j²/n_j)/2) with Welch’s degrees of freedom.

Type Aliases§

IntervalMatrices
Lower and upper limits, as k × k matrices.