bio-clinical-biostatistics-subgroup-analysis
Performs subgroup and heterogeneous treatment effect (HTE) analyses for clinical trials. Covers Mantel-Haenszel pooling, Breslow-Day, interaction tests in regression, RERI for additive interaction, modern data-adaptive HTE methods (STEPP, SIDES, causal forests, X/R-learners), Bayesian shrinkage (Dixon-Simon, MAP, EXNEX), graphical multiplicity (Bretz-Maurer), and credibility frameworks (Sun BMJ, EMA 2019). Use when analyzing treatment effects across patient subgroups for regulatory submissions or precision-medicine claims.
npx skills add BioTender-max/awesome-bio-agent-skills --skill subgroup-analysis --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
What it does
Performs subgroup and heterogeneous treatment effect (HTE) analyses for clinical trials, covering Mantel-Haenszel pooling, Breslow-Day, interaction tests in regression, RERI for additive interaction, modern data-adaptive HTE methods (STEPP, SIDES, causal forests, X/R-learners), Bayesian shrinkage (Dixon-Simon, MAP, EXNEX), graphical multiplicity (Bretz-Maurer), and credibility frameworks (Sun BMJ, EMA 2019). Use when analyzing treatment effects across patient subgroups for regulatory submissions or precision-medicine claims.
How it works
The skill explicitly instructs step-by-step methods and examples:
- Mantel-Haenszel pooled odds ratio calculation across strata with CMH test; Breslow-Day test for homogeneity; cautions on power and interpretation. Includes Python snippet using StratifiedTable to compute pooled OR, confidence interval, and p-values for CMH and Breslow-Day.
- Interaction terms in a single regression model as the regulatory standard; provides code for logistic regression with interaction, LR test against an additive model, and extraction of subgroup-specific ORs with confidence intervals.
- RERI for additive interaction, describing the computation and interpretation in terms of ORs and the delta-method/bootstrap for CIs.
- Modern data-adaptive HTE methods: STEPP, SIDES/SIDEScreen, causal forests, Meta-learners (X/R-learner, MOB). It shows conceptual workflows and references, with Python/R code hints:
- STEPP: sliding-window approach with permutation supremum tests; notes on correlation of estimates and Naive CI limitations.
- SIDES/SIDEScreen: recursive partitioning with permutation-adjusted subgroup p-values; multiplicity absorption.
- Causal forests: use grf in R or econml in Python; emphasis on honest splitting, ATE/CATE estimation, and calibration testing (test_calibration).
- Meta-learners: S-, T-, X-, and R-learners with cross-fitting and propensity considerations; example code using econml XLearner or related classes.
- Bayesian shrinkage: describes Dixon-Simon 1991 prior for exchangeable interaction effects, EXNEX approach, and notes on borrowing across baskets with caution about prior influence.
- Diagnostic and regulatory context: references to credibility frameworks (Sun BMJ, EMA 2019) and considerations for pre-specified vs discovery subgroups, multiplicity adjustments, and reporting practices.
When to use it
Use when: analyzing treatment effects across subgroups, including regulatory submissions or precision-medicine claims; when planning subgroup analyses with pre-specified or data-discovered subgroups; when employing either classical stratified methods or modern HTE approaches and Bayesian borrowing.
What it can touch
Tooling is restricted to the primary tool: statsmodels for Python-based analyses and R packages (STEPP, SIDES, grf) as indicated; executable scripts ship with the skill folder and are meant for Python usage with statsmodels and related libraries as stated.
Caveats
Notes include power limitations for interaction detection, potential over- or under-estimation in heterogeneity, need to declare confirmatory vs exploratory intent, and sensitivity to prior choices in Bayesian shrinkage; also cautions about honest-splitting validation and calibration checks in causal forests. Licensing is NOASSERTION.
## Version Compatibility Reference examples tested with: statsmodels 0.14+, scipy 1.12+, numpy 1.26+, pandas 2.1+, matplotlib 3.8+, scikit-learn 1.4+. R packages cited: grf, policytree, causalToolbox, personalized, SIDES, stepp, gMCP, partykit, RBesT, brms. Before using code patterns, verify installed versions match. If versions differ: - Python: `pip show <package>` then `help(module.function)` to check signatures - R: `packageVersion('<pkg>')` then `?function_name` If code throws ImportError, AttributeError, or TypeError, introspect the installed package and adapt the example to match the actual API rather than retrying. # Subgroup Analysis and Heterogeneous Treatment Effects **"Analyze treatment effects across subgroups"** -> Test whether treatment effects differ across pre-specified or data-discovered subgroups using interaction tests, stratified estimators, modern data-adaptive HTE methods, or Bayesian shrinkage -- with explicit declaration of confirmatory vs exploratory intent and credibility assessment. ## The Senn Foundation -- Why Most Subgroup Claims Are Wrong **Senn 2018 *Nature* 563:619-621 (and *Statistical Issues in Drug Development* Ch. 9, 14):** observed between-pat
- Version Compatibility
- The Senn Foundation -- Why Most Subgroup Claims Are Wrong
- Algorithmic Taxonomy
- Decision Tree by Scenario
- Mantel-Haenszel and Stratified Analysis
- Interaction Terms in Regression -- The Correct Way
- RERI for Additive Interaction
- Modern Data-Adaptive HTE Methods
- STEPP (Subpopulation Treatment Effect Pattern Plot)
- SIDES / SIDEScreen
- Causal forests (Athey-Wager)
- Meta-learners (Künzel-Sekhon-Bickel-Yu 2019 PNAS 116:4156)
- Bayesian Shrinkage -- The Postdoc Argument
- Multiplicity for Subgroup Analyses
What does the bio-clinical-biostatistics-subgroup-analysis skill do?
Performs subgroup and heterogeneous treatment effect (HTE) analyses for clinical trials. Covers Mantel-Haenszel pooling, Breslow-Day, interaction tests in regression, RERI for additive interaction, modern data-adaptive HTE methods (STEPP, SIDES, causal forests, X/R-learners), Bayesian shrinkage (Dixon-Simon, MAP, EXNEX), graphical multiplicity (Bretz-Maurer), and credibility frameworks (Sun BMJ, EMA 2019). Use when analyzing treatment effects across patient subgroups for regulatory submissions or precision-medicine claims.
How do I install it?
Run `npx skills add BioTender-max/awesome-bio-agent-skills --skill subgroup-analysis --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From BioTender-max/awesome-bio-agent-skills, a repository with 135 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
