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: equivalence testing for ANOVA, k-sample comparison #6444
specific case for #6404
looks pretty straightforward to implement
Wellek and Wellek-Welch ANOVA with equivalence test.
Equivalence is defined in terms of the test statistic, approximately ratio of between variance and within variance. Distribution in non-central F where non-centrality parameter depends on equivalence margin.
There are also other methods, e.g. pairwise t-test equivalence testing and maybe some variation on tukey-hsd and looking at standard confidence intervals directly.
aside: where is the code for Welsh's ANOVA?
It looks like the test statistic is the same for the standard equality hypothesis and the equivalence hypothesis.
effect sizes for anova, oneway and specifying equivalence margin
psi_squared (I never now which greek letters those animals are) in Wellek is increasing in k (n_groups) but not in average number of observations per group.
es = f * (n_groups - 1) / nobs_mean where f is the f-statistic from an anova test
There are other ways of defining equivalence for oneway comparison in various articles, eg. one is the maximum absolute difference between pairs of means max(mean_i) - min(mean_i) (studetized range statistic as in tukey-hsd) and some related to other Cohen type effect sizes.
The usability problem here is still whether there is an intuitive meaningful way of specifying equivalence, or non-inferiority margins, and not just copying some thresholds from the literature.
I don't find any issues, but I had equivalence tests for chisquare based gof tests, but gave up because I didn't find a meaningful, interpretable specification of effect size margins.
"When are two models equivalent?" i.e. there is no substantively relevant difference.
implementation: get several versions of defining equivalence margin and leave the interpretation up to the user.
(It's relatively easy to add equivalence hypothesis to existing tests with a margin, if we have the relevant non-centrality)
to Wellek psi:
My guess is that the relevant asymptotics or comparison is n_groups fixed and nobs per group increasing. That's underlying the sample size computation for two or k-sample hypothesis tests.
Instead we could also have increasing n_groups (k) as in panel or clustered data. I guess in that case we need to normalize the effect size by the number of groups.
(Also, for some agreement measures a property under discussion was the effect of combining groups/categories, e.g. gender might be fixed binary, but we can form different sets of age groups, or use different levels in a hierarchical classification, or a 3 point versus a 5 point scale)
The max distance between any pairs of means would be independent of number of groups, but distribution of max-distance would depend on how many means there are, i.e. the empirical max distance is still increasing in the number of groups.
(I have not yet seen a discussion of this in the literature.)
However, in contrast to Cribbie, it looks like Show-Li and Shieh don't include the Welch correction in their equivalence effect size measure. Koh and Cribbie 2012 use the rescaled Welch corrected F-statistic.
(note I have already an option to turn off the Welch correction to match HC2)
However, the actual test uses Welch corrected test statistic W and satterthwaite df, the equivalence margin shows up only in the non-centrality parameter.
So there might not actually be any difference in the actual computation between those articles.
too much Greek in Show-Li and Shieh
psi according to Wellek
xi as analogue to Cohen's f for unbalanced, but homogeneous variance case
omega as analogue to Cohen's f for Welch case, unbalanced and heteroscedastic (and the omega looks the same as w for weights)
They use omega/xi/f and not psi, which makes it more comparable across different n_groups
Show-Li and Shieh have the Welch results for the example in Wellek's book
which matches my results, where eps is defined in normalization of Wellek/Cribbie psi effect size
Internally everything is converted to f-statistics, so definition of equivalence margin is mainly relevant for users.
power_zero is power of equivalence test given the alternative is identical means.
They don't include that power example.
I don't get exactly the same power for a non-zero example that they have, it looks like empirical power
mine: 0.1564 versus theirs:0.1552
(I'm using generic noncentral f parameters, they reference Levy 1978 in the appendix, but I cannot see whether that is different from generic or not.)
correction
I forgot to turn off the welch_correction for the noncentrality in the power computation
now I get 0.155186
I guess I rewrite the function in terms of f/omega/xi and not psi as in Wellek
Activity
josef-pkt commentedon Jan 22, 2020
Welsh anova and similar, see #866 (comment)
josef-pkt commentedon Feb 5, 2020
Mara, Constance A., and Robert A. Cribbie. 2018. “Equivalence of Population Variances: Synchronizing the Objective and Analysis.” The Journal of Experimental Education 86 (3): 442–57. https://doi.org/10.1080/00220973.2017.1301356.
Kim, Yoosun Jamie, and Robert A. Cribbie. 2018. “ANOVA and the Variance Homogeneity Assumption: Exploring a Better Gatekeeper.” British Journal of Mathematical and Statistical Psychology 71 (1): 1–12. https://doi.org/10.1111/bmsp.12103.
Levene–Wellek equivalence test for homogeneity/equivalence of variance or dispersion.
josef-pkt commentedon Mar 11, 2020
AFAICS, there are no packages on CRAN with Wellek oneway equivalence testing
that's a problem for writing unit tests
josef-pkt commentedon Mar 12, 2020
effect sizes for anova, oneway and specifying equivalence margin
psi_squared(I never now which greek letters those animals are) in Wellek is increasing in k (n_groups) but not in average number of observations per group.es = f * (n_groups - 1) / nobs_meanwherefis the f-statistic from an anova testThere are other ways of defining equivalence for oneway comparison in various articles, eg. one is the maximum absolute difference between pairs of means
max(mean_i) - min(mean_i)(studetized range statistic as in tukey-hsd) and some related to other Cohen type effect sizes.The usability problem here is still whether there is an intuitive meaningful way of specifying equivalence, or non-inferiority margins, and not just copying some thresholds from the literature.
I don't find any issues, but I had equivalence tests for chisquare based gof tests, but gave up because I didn't find a meaningful, interpretable specification of effect size margins.
"When are two models equivalent?" i.e. there is no substantively relevant difference.
implementation: get several versions of defining equivalence margin and leave the interpretation up to the user.
(It's relatively easy to add equivalence hypothesis to existing tests with a margin, if we have the relevant non-centrality)
to Wellek psi:
My guess is that the relevant asymptotics or comparison is n_groups fixed and nobs per group increasing. That's underlying the sample size computation for two or k-sample hypothesis tests.
Instead we could also have increasing n_groups (k) as in panel or clustered data. I guess in that case we need to normalize the effect size by the number of groups.
(Also, for some agreement measures a property under discussion was the effect of combining groups/categories, e.g. gender might be fixed binary, but we can form different sets of age groups, or use different levels in a hierarchical classification, or a 3 point versus a 5 point scale)
The max distance between any pairs of means would be independent of number of groups, but distribution of max-distance would depend on how many means there are, i.e. the empirical max distance is still increasing in the number of groups.
(I have not yet seen a discussion of this in the literature.)
josef-pkt commentedon Mar 12, 2020
Shieh, Gwowen. 2016. “A Comparative Appraisal of Two Equivalence Tests for Multiple Standardized Effects.” Computer Methods and Programs in Biomedicine 126 (April): 110–17. https://doi.org/10.1016/j.cmpb.2015.12.004.
He uses directly cohens' f as effect size for the Wellek type equivalence anova test, not psi as inWellek's book and in several Cribbie articles.
The 2016 article assumes homogeneous variance a balanced sample. There should be a newer article for heteroscedasticity with Welch type anova.
Jan, Show-Li, and Gwowen Shieh. 2019. “On the Extended Welch Test for Assessing Equivalence of Standardized Means.” Statistics in Biopharmaceutical Research 0 (0): 1–8. https://doi.org/10.1080/19466315.2019.1654915.
uses Welch heteroscedasticity
However, in contrast to Cribbie, it looks like Show-Li and Shieh don't include the Welch correction in their equivalence effect size measure. Koh and Cribbie 2012 use the rescaled Welch corrected F-statistic.
(note I have already an option to turn off the Welch correction to match HC2)
However, the actual test uses Welch corrected test statistic W and satterthwaite df, the equivalence margin shows up only in the non-centrality parameter.
So there might not actually be any difference in the actual computation between those articles.
too much Greek in Show-Li and Shieh
psi according to Wellek
xi as analogue to Cohen's f for unbalanced, but homogeneous variance case
omega as analogue to Cohen's f for Welch case, unbalanced and heteroscedastic (and the omega looks the same as w for weights)
They use omega/xi/f and not psi, which makes it more comparable across different n_groups
josef-pkt commentedon Mar 12, 2020
Show-Li and Shieh have the Welch results for the example in Wellek's book
which matches my results, where eps is defined in normalization of Wellek/Cribbie psi effect size
Internally everything is converted to f-statistics, so definition of equivalence margin is mainly relevant for users.
esin my current prototype code is psipower_zero is power of equivalence test given the alternative is identical means.
They don't include that power example.
I don't get exactly the same power for a non-zero example that they have, it looks like empirical power
mine: 0.1564 versus theirs:0.1552
(I'm using generic noncentral f parameters, they reference Levy 1978 in the appendix, but I cannot see whether that is different from generic or not.)
correction
I forgot to turn off the welch_correction for the noncentrality in the power computation
now I get 0.155186
I guess I rewrite the function in terms of f/omega/xi and not psi as in Wellek
josef-pkt commentedon Aug 23, 2020
equivalence testing with Wellek Anova has been implemented and merged in PR #6789
AFAIR, I didn't include all these references in docs, also notebook with background is missing