ENH roadmap: power for regression models, GLM

Open
#9,414 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Stale
Tech stack
python
Domain
data

Research direction

Start by reading statsmodels/stats/effect_size.py and the stats.contrast helpers wald_test_noncent and wald_test_noncent_generic. Review the existing normal, t-test, and generic F-test power implementations, then narrow the roadmap to an initial local-power case. Done should mean the selected power functionality has a defined interface and supporting examples or tests.

Written by the indexing model from the issue text.

Description

comp-genmod comp-stats roadmap type-enh

local alternative #2217 #1758
regression, glm general #6759 #7542 #6558 #8148
general power issues, roadmap #8705

to get started in this direction:
start with simple versions and add refinements later, e.g. initially mainly local power and simple cases,
later adding power for GLM, Logit, Poisson without local alternative would be useful (var_null not equal to var_alternative)

  • tools based on existing statistic, exemplary data, pilot studies, previous studies
    • statsmodels/stats/effect_size.py includes private functions to compute non-centrality from test statistics. I don't remember what the different versions of nc estimators are.
    • stats.contrast also has already helper functions: wald_test_noncent and wald_test_noncent_generic (better names would start with noncent, because that is what it returns, and it's not a test.
    • no current examples to compute power from those nc, we have normal, t-test power and (looks like) generic F-test power
    • missing generic chisquare power class
    • we might need api, interface to use normalized non-centrality nc / nobs as argument in functions or methods. (e.g. current F-test power uses Cohen's f-squared)
    • can we compute nc from basic parameters, e.g. mean, proportion, rates and variance? (Note in single parameter tests we often use just normal, z. AFAIR equivalence test for oneway has computation for equivalence margin from multiple parameters.)
  • .can we provide tools for constructing "exemplary data sets"? e.g. 1-binary regressors, 1 categorical (one way), crossed-effect, plus some confounders.
  • try vif correction for 2 sample methods (1 sample tests should correspond to estimating constant, e.g. assuming all other exog are centered, but in that case they would be orthogonal (?))
  • ...
Dominant language
Python
Stars
11.6k
Forks
3.6k
Avg merge
7h 37m
Merged PRs (30d)
96

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from statsmodels/statsmodels

All issues in statsmodels/statsmodels

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.