bio-clinical-biostatistics-effect-measures
Computes and interprets treatment effect measures (OR, RR, RD, HR, NNT) with calibrated confidence intervals (Wilson, Newcombe, Miettinen-Nurminen, MOVER, profile likelihood, Bender NNT) and reports marginal vs conditional estimands per FDA 2023 covariate adjustment guidance. Use when reporting treatment effects in confirmatory trials, comparing effect sizes across studies, or constructing forest plots.
npx skills add BioTender-max/awesome-bio-agent-skills --skill effect-measures --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
Computes and interprets treatment effect sizes (OR, RR, RD, HR, NNT) with confidence intervals calibrated to sample size, and reports whether the estimand is marginal or conditional according to FDA 2023 covariate adjustment guidance. It is intended for use in reporting treatment effects in confirmatory trials, comparing effect sizes across studies, or constructing forest plots.
How it works
The skill presents an algorithmic taxonomy and decision-tree guidance for selecting estimands and corresponding CI methods across scenarios (binary outcomes in RCTs, case-control settings, time-to-event data, noninferiority on different scales, stratified designs). It prescribes specific CI methods for each measure (e.g., MN score, Newcombe-Wilson, profile likelihood, Wald, MOVER) and includes practical code patterns for:
- Unadjusted 2x2 tables to compute OR, RR with appropriate CIs and calibrations.
- RD confidence intervals via Newcombe-Wilson hybrid or MN score for regulatory contexts.
- Absolute and relative measures (RD, RR, OR) with recommended methods depending on design and prevalence.
- NNT computation using RD CI and handling of RD=0 with Bender 2001 methodology, including NNTB/NNTH reporting when CI crosses zero.
- Marginal RD via g-computation (FDA 2023 recipe) using logistic regression with covariates, predicting under treatment and control, averaging predictions, and obtaining SE via bootstrap or influence-function approaches. R equivalents via marginaleffects are provided.
- Distinguishing marginal versus conditional estimands in logistic models, with examples showing how to report marginal RD as primary and conditional OR as supportive.
The skill also includes concrete code snippets (Python and R) demonstrating how to implement these calculations, including: fit/logistic models, counterfactual predictions, standardisation to obtain marginal effects, and bootstrapSE calculations.
When to use it
Use when reporting treatment effects in confirmatory trials, when comparing effect sizes across studies, or when constructing forest plots that require calibrated CIs for OR, RR, RD, HR, or NNT, and when FDA 2023 covariate-adjustment guidance applies (report marginal estimands for primary endpoints and conditional estimands as supportive).
What it can touch
- Python tools: statsmodels (for contingency tables, logit models, Wald/score-type CIs), numpy.
- R tools: marginaleffects (for marginal RD with HC3), base glm/logit for conditional estimates.
- It references methods like Miettinen-Nurminen, Newcombe-Wilson, MOVER, Bender NNT, profile likelihood, and g-computation via standardisation.
Caveats
- License: NOASSERTION.
- Requires correct version compatibility (e.g., statsmodels 0.14+, numpy 1.26+, pandas 2.1+, etc.).
- The conditional vs marginal estimand distinction is emphasized; marginals are primary per FDA 2023 guidance for binary endpoints, with conditional estimates as supportive.
- The methods assume appropriate model specification for marginal RD via g-computation; bias can arise if models are misspecified (robustness note included).
## Version Compatibility Reference examples tested with: statsmodels 0.14+, numpy 1.26+, pandas 2.1+, matplotlib 3.8+, marginaleffects (Python) 0.0.13+ / (R) 0.20+. R packages cited: ratesci, exact2x2, marginaleffects, riskCommunicator, RobinCar. 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. # Treatment Effect Measures for Clinical Trials **"Compute treatment effect sizes"** -> Estimate the population-level treatment contrast (OR, RR, RD, HR, NNT) with a confidence interval calibrated to sample size and a clear declaration of whether the estimand is marginal or conditional under ICH E9(R1). ## Algorithmic Taxonomy | Measure | Scale | Collapsible? | Best CI method | When to use | Fails when | |---------|-------|--------------|----------------|-------------|------------| | OR | Log-odds ratio | NO (non-collapsible) | Profile likelihood; Wald acceptable for n>100
- Version Compatibility
- Algorithmic Taxonomy
- Decision Tree by Scenario
- Crude Effect Measures from 2x2 Tables
- Modern Confidence Intervals -- the Postdoc Toolkit
- Single proportion
- Difference of two proportions (RD)
- Ratio of two proportions (RR)
- Odds ratio
- Number Needed to Treat (NNT) -- the Bender 2001 CCT 22:102 Way
- Marginal RD via G-Computation -- The FDA 2023 Recipe
- Marginal vs Conditional Effects -- The Core ICH E9(R1) Question
- Non-collapsibility -- the standard explanation
- Reconciliation: When Methods Disagree
What does the bio-clinical-biostatistics-effect-measures skill do?
Computes and interprets treatment effect measures (OR, RR, RD, HR, NNT) with calibrated confidence intervals (Wilson, Newcombe, Miettinen-Nurminen, MOVER, profile likelihood, Bender NNT) and reports marginal vs conditional estimands per FDA 2023 covariate adjustment guidance. Use when reporting treatment effects in confirmatory trials, comparing effect sizes across studies, or constructing forest plots.
How do I install it?
Run `npx skills add BioTender-max/awesome-bio-agent-skills --skill effect-measures --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.
