Skip to content

SUMM/ENH effect size measures, collection and api #7674

Open

Description

@josef-pkt

effect size measures need another round

we have code in issues and PRs, but no overview and convenient systematic api for those

e.g. stats.effectsize module has only private functions and is not in docs
https://github.com/statsmodels/statsmodels/pull/7084/files

R package effectsize looks good to get collection of functions and semi-generic tie in to models, e.g.
https://rdrr.io/cran/effectsize/man/F_to_eta2.html
Their vignettes might also have a good collections of examples to replicate, e.g.
https://rdrr.io/cran/effectsize/f/vignettes/from_test_statistics.Rmd

for oneway anova we have a good collection of helper functions
https://www.statsmodels.org/dev/stats.html#oneway-anova

Related: adding good summary or summary_frame to results of hypothesis tests, confint and similar, where we can add options for effectsize

motivation, example:
#6598 (possible candidate to still add to 0.13)
adding effectsize based on chi2 to contingency table with unit test using R effectsize chisq_to_phi function

Activity

  1. added this to the 0.14 milestone on Aug 28, 2021
  2. josef-pkt commented on Aug 30, 2021

    @josef-pkt
    MemberAuthor

    Reading and browsing on effect size, just gets me lost again.
    e.g. http://jakewestfall.org/blog/index.php/2016/03/25/five-different-cohens-d-statistics-for-within-subject-designs/
    https://stats.stackexchange.com/questions/256053/variance-of-cohens-d-for-within-subjects-designs

    Westfall advocates plain Cohen's d with the objective of having an effectsize measure that is independent of experimental design, i.e. divide by average population standard deviation. One alternative is to use std of difference (e.g. (I think) using one sample test for individual difference across treatments)
    (often they use parametric estimate of correlation between repeat observations.)
    (We still have the problem that estimate for "population standard deviation" depends on the sample population, which will differ across experiments, groups, samples.)

    However, using effectsize for power and sample size computation we need to take design into account.

    It looks like we want to have two main objectives corresponding to meta-analysis and power/sample size computation.
    (answer on stats.stackexchange seems to be by author of R package metafor)

    Reminder: population standard deviation in cohen's d is not the standard deviation in the test statistic, e.g. in two sample case.)

  3. josef-pkt commented on Sep 3, 2021

    @josef-pkt
    MemberAuthor

    Which effect size do we use for t-tests?
    When I wrote the power classes, I only looked at effect sizes used by other power packages R pwr and GPower.

    I didn't know anything about Cohen's d and scaling that is not based on the variance of the test statistic.
    Essentially, effect size for power calculation is non-centrality / nobs (I thought)

  4. modified the milestones: 0.14, 0.15 on Dec 1, 2022
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

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions