Skip to content

ENH: equivalence testing for ANOVA, k-sample comparison #6444

Open

Description

@josef-pkt

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.

Cribbie, Robert A., Chantal A. Arpin-Cribbie, and Jamie A. Gruman. 2009. “Tests of Equivalence for One-Way Independent Groups Designs.” The Journal of Experimental Education 78 (1): 1–13. https://doi.org/10.1080/00220970903224552.

Koh, Andy, and Robert Cribbie. 2013. “Robust Tests of Equivalence for k Independent Groups.” British Journal of Mathematical and Statistical Psychology 66 (3): 426–34. https://doi.org/10.1111/j.2044-8317.2012.02056.x.

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.

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.

Activity

  1. josef-pkt commented on Jan 22, 2020

    @josef-pkt
    MemberAuthor

    Welsh anova and similar, see #866 (comment)

  2. josef-pkt commented on Feb 5, 2020

    @josef-pkt
    MemberAuthor

    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.

  3. josef-pkt commented on Mar 11, 2020

    @josef-pkt
    MemberAuthor

    AFAICS, there are no packages on CRAN with Wellek oneway equivalence testing

    that's a problem for writing unit tests

  4. josef-pkt commented on Mar 12, 2020

    @josef-pkt
    MemberAuthor

    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.)

  5. josef-pkt commented on Mar 12, 2020

    @josef-pkt
    MemberAuthor

    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

  6. josef-pkt commented on Mar 12, 2020

    @josef-pkt
    MemberAuthor

    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.

    es in my current prototype code is psi

    f, pv, df = anova_welch([y0, y1, y2, y3], welch_correction=True)
    res = oneway_equivalence_generic(f, n_groups, nobs.sum(), eps, df, alpha=0.05)
    vars(res)
    ​
    {'es': 0.026437609002352157,
     'pvalue': 0.010952208410561057,
     'crit_f': 0.3054334284582672,
     'crit_es': 0.07330402282998413,
     'reject': True,
     'power_zero': 0.17883533214282388,
     'df': (3.0, 22.653586428483226)}
    

    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

  7. josef-pkt commented on Aug 23, 2020

    @josef-pkt
    MemberAuthor

    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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions