-
Notifications
You must be signed in to change notification settings - Fork 2.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ENH/REF/SUMM: enhance, refactor power classes #8652
Comments
some overview references https://stats.oarc.ucla.edu/other/mult-pkg/faq/general/effect-size-power/faqhow-is-effect-size-used-in-power-analysis/ GPower manual has much better coverage of cases than when I wrote power classes related Stata partially related meta-analysis effect size https://www.stata.com/manuals/metametaesize.pdf NCSS/PASS several doc chapter on regression including linear, poisson and binomial, and GEE https://www.ncss.com/wp-content/themes/ncss/pdf/Procedures/PASS/Multiple_Regression.pdf another interesting one WMW rankorder statistic, stochastically larger as in brunner-munzel in R partially related: effect size in meta-analysis https://bookdown.org/MathiasHarrer/Doing_Meta_Analysis_in_R/es-calc.html slides for GPower https://med.und.edu/research/daccota/_files/pdfs/berdc_resource_pdfs/sample_size_gpower_module.pdf |
(random thought) t-test with unequal variance (Welch, HC): |
semi-random idea use keyword value "required" in solve_power, e.g. base rate or proportion for poisson, binomial
The first is more flexible if we want to loop over a required keyword, and power method itself will be vectorized in the required keyword in many cases, but not in string keywords like Name of class would more likely be |
not clear to me or I don't remember How are effect size and power defined for e.g. hypothesis tests with inherent heteroscedasticity: How does it work if we use "ratio" or "diff" as (raw) effect size for Binomial and Poisson power? In cases other than solving for minimum detectable effect, there should not be a problem because users specify all rates or proportions under the alternative. AFAICS, TestTTPowerTwoSx for two sample t-test do not include unit tests for alternative="smaller" (two-sided and larger are included) However, docstring for effect size of TTestIndPower says " Also, currently we don't have a null_value (for a margin under the null) in the power classes. In t-test it can be subsumed under the effect size (AFAIU, AFAIR), but not for full poisson, binomial tests. (inferiority, superiority) Also, no power classes yet for any TOST, AFAICS. (need to check what interface R powerTOST package is using, I never looked at it AFAIR) |
triggered by #8646 and #8651
see also #8159 for power classes without effect size
related issues: ...
The semi-generic power classes were written initially based on effect sizes and packages GPower and R pwr.
Design decisions were based on those packages with the generic structure it is often not "obvious" how to use those.
Target is to make them more directly usable and extend them to new cases, with possibly test specific power classes.
This should be based more on NCSS/PASS and new Stata pss, than on the previous packages.
The more recent power function, especially for cases where var/std differs between null and alternative as in rates and proportions, where heavily based on the NCSS/PASS docs.
Additionally, I want
not clear yet
e.g. robust cov_type, excess dispersion in poisson, kurtosis in variance hypothesis tests
specific todos
method
argument if we make classes for recently added power functions like those for rates and proportions.I guess (not checked again): The basic power classes for one sample TTestPower can be used for generic case if std in effect size is the std of the (unstandardized) test statistic.
Why is there currently no NormalPower class? We only have NormalIndPower with same equal var assumption as TTestIndPower.
update
NormalIndPower can be used for one sample test if ratio=0
It wouldn't cost much to add a specific NormalPower class.
Aside:
NormalIndPower has an option in the
__init__
self.ddof = ddof
instead of as method keyword.It's the only power class with an
__init__
methodThe text was updated successfully, but these errors were encountered: