You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
ENH: tukeyhsd, pairwise comparison from summary statistics #4570
Just in case anyone is in need of a quick hack, this worked for me. Output is a tuple instead of TukeyHSDResults. For some reason putting the vector of variances directly into tukeyhsd() gave crazy results, only works when var_all is a scalar.
import numpy as np
def tukey_from_summary(means,stdevs,ns,alpha=.05):
from statsmodels.sandbox.stats.multicomp import tukeyhsd
variances = stdevs**2
pooled_var = sum(np.multiply(variances,(ns-1)))/sum(ns-1)
res = tukeyhsd(mean_all=means, nobs_all=ns, var_all=pooled_var, alpha=alpha, q_crit=None)
return res
Activity
sadepu1915 commentedon Jun 30, 2019
is anyone working on it ?
g-simmons commentedon Jul 24, 2019
Just in case anyone is in need of a quick hack, this worked for me. Output is a tuple instead of TukeyHSDResults. For some reason putting the vector of variances directly into
tukeyhsd()gave crazy results, only works whenvar_allis a scalar.josef-pkt commentedon Sep 5, 2022
sounds like a bug
There were some bugs in my initial var correction functions. Maybe they have not all been fixed.
josef-pkt commentedon Dec 5, 2022
check during refactoring #8396
helper functions like var computation need more unit tests, and possibly removal of code duplication.
josef-pkt commentedon Jan 21, 2025
statsmodels.sandbox.stats.multicomp.tukeyhsd does not have proper docstring
return is a messy tuple
This was not intended for public usage.
We need a "from stats" function that has clean interface.
possibly add variance equal/unequal option to compute pooled or pairwise variances.