Skip to content

ENH: Power classes for sample size computation without effect size, i.e. explicit variances #8159

Open

Description

@josef-pkt

part of #1197
cases where variance can differ between null and alternative or alternatives (in TOST equivalenc)
current context #8138

My original implementation of the Power classes followed the effect size tradition of incorporating standard deviation in the effect size instead of handling it explicitly in the methods of the power classes.

I have added power function for two sample proportion using std_null and std_alternative.
AFAIR, I didn't change power classes to accommodate for it.

example case
power for equivalence test for comparing ratio of 2 poisson or 2 negative binomial random variables
Zhu 2016 and PASS documentation
needs 3 standard deviation null under alternative at lower and upper equivalence margin, and distribution under alternative.

Poisson, NegBin and similar cases follow the same pattern.

I guess I will need classes for power of equivalence tests, separate from those for standard test of equality (or equality with a margin value)

Activity

  1. added this to the 0.14 milestone on Feb 28, 2022
  2. josef-pkt commented on Feb 28, 2022

    @josef-pkt
    MemberAuthor

    We only support calculating power and sample size(s).

    Solving for detectable effectsize is more difficult because we cannot keep variance, std constant when changing effect size in these cases where variance is a function of the mean.

    It would be possible if all variance computation are inside the power function. In that case we need classes for the specific case and cannot rely and generic cases as we currently do for normal and t distribution.

  3. josef-pkt commented on Jun 13, 2022

    @josef-pkt
    MemberAuthor

    We need a generic class with extra helper methods like var_null, var_alt
    example power functions for Poisson and Negbin in #8166

    Those could be embedded in a distribution and case specific class.
    I guess method options could go into the __init__ of the class.
    The power method of the class would define the available keywords for rootfinding and delegate to the (standalone) power functions.

    Currently we don't have a power function that combines method and "compare" options. see issue #8303
    (I'm not yet, sure about the signature of the power function for poisson, binomial, eg. both rates/proportions versus one rate and a value, diff or ratio, under the alternative.

    related: what "effect size" should we look for if we want minimum effect for given power, alpha and nobs?

    If we use rate1, rate2 (in poisson), then one could be fixed and we find the second.
    If we use rate1, diff, then it will not be possible to find detectable "diff" for given rate2, i.e. rate of reference group, unless we reverse labels for treatment and reference group.
    possible problem:
    diff = rate1 - rate2 could be positive or negative, There is no absolute value and we could have minimum detectable effect in either direction.

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