Logo von Bio Clinical Biostatistics Power Sample Size

Bio Clinical Biostatistics Power Sample Size

Organisation
PKU-YuanGroup
bio-clinical-biostatistics-power-sample-size

Berechnet Stichprobengröße und Power für klinische Studien mit kontinuierlichen, binären und Zeit-bis-Ereignis-Endpunkten sowie für Überlegenheits-, Nichtunterlegenheits- und Äquivalenzdesigns. Berücksichtigt die FDA-Leitlinien von 2016 zur Wahl der Nichtunterlegenheitsmarge mit dem M1/M2-Rahmen, Schoenfeld 1981 und Lakatos 1988 für Überlebenszeitanalysen, Schuirmann TOST und 80–125 % Bioäquivalenz sowie die Abgrenzung zwischen klinisch relevantem Mindestunterschied (MCID) und δ. Nutzen Sie diesen Skill, um die Studiengröße im Prüfplan oder SAP gemäß CONSORT 2025, Punkt 16a, zu begründen.

Add to TypingMind

Übersicht

HerausgeberPKU-YuanGroup
RepositoryOpenAI4S
Skill-Namebio-clinical-biostatistics-power-sample-size
Sterne
622
Forks
72
Mitgelieferte Dateien
2
LizenzMIT
Links
  • Anweisungen in Markdown

    Eine SKILL.md-Datei, die das Modell bei Bedarf lädt. So werden nur dann Token verbraucht, wenn eine Anfrage tatsächlich dazu passt.

  • Funktioniert mit jedem LLM

    KI-Skills bestehen aus reinem Markdown, nicht aus anbieterspezifischem Code. Daher funktionieren sie mit GPT, Claude, Gemini, Grok oder einem lokalen Modell.

  • Mitgelieferte Dateien: 2

    Skripte, Vorlagen und Referenzmaterial, die das Modell bei der Arbeit lesen kann. Die Dateien sind schreibgeschützt und werden niemals ausgeführt.

  • Open Source

    Von PKU-YuanGroup auf GitHub veröffentlicht. Prüfen Sie vor der Installation die Quelldateien.

Installation

Installieren Sie den KI-Skill Bio Clinical Biostatistics Power Sample Size in TypingMind, um ihn mit jedem LLM zu nutzen, oder fügen Sie ihn einem anderen Agenten hinzu, der SKILL.md lesen kann.

1

In TypingMind installieren

TypingMind installiert einen Skill direkt aus seinem GitHub-Ordner. Dabei liest die App SKILL.md, bündelt die Ressourcendateien und speichert das Ergebnis lokal.

  1. Öffnen Sie die App und gehen Sie zu Plugins → Skills.
  2. Wählen Sie „Von GitHub installieren“.
  3. Fügen Sie die unten angegebene URL des Skill-Ordners ein und bestätigen Sie.
    https://github.com/PKU-YuanGroup/OpenAI4S/tree/main/skills/bioskills/bio-clinical-biostatistics-power-and-sample-size
  4. Aktivieren Sie den Skill in jedem Chat, in dem er verfügbar sein soll.
Plugins → Skills → Skill hinzufügen → Über GitHub-URL. Fügen Sie dann die Ordner-URL ein und klicken Sie auf „Weiter“.
2

In einem anderen Agenten installieren

Jeder Agent, der das Agent-Skills-Format unterstützt, kann diesen Skill nutzen. Kopieren Sie den Ordner in das Skill-Verzeichnis des jeweiligen Agenten.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/PKU-YuanGroup/OpenAI4S.git /tmp/OpenAI4S
mkdir -p .claude/skills
cp -r /tmp/OpenAI4S/skills/bioskills/bio-clinical-biostatistics-power-and-sample-size .claude/skills/bio-clinical-biostatistics-power-sample-size
Starten Sie Claude Code nach dem Kopieren neu, damit der neue Skill erkannt wird.

In TypingMind verwenden

Aktivieren Sie Bio Clinical Biostatistics Power Sample Size in einem beliebigen Chat in TypingMind. Den Rest übernimmt das Modell. Name und Beschreibung des Skills stehen im System-Prompt. Sobald eine Anfrage passt, lädt das Modell selbstständig die vollständigen Anweisungen — Sie müssen den Skill nie manuell aufrufen, und er verbraucht erst Token, wenn er tatsächlich genutzt wird.

Das Modell lädt Bio Clinical Biostatistics Power Sample Size automatisch, sobald eine passende Anfrage gestellt wird.

Funktioniert mit jedem KI-Modell

KI-Skills bestehen aus reinen Markdown-Anweisungen statt aus anbieterspezifischem Code. Daher ist Bio Clinical Biostatistics Power Sample Size nicht an das Modell gebunden, für das der Skill geschrieben wurde. Installieren Sie ihn einmal in TypingMind und nutzen Sie ihn mit GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama oder einem selbst betriebenen lokalen Modell — alles mit Ihren eigenen API-Schlüsseln.

  • Wird nur bei Bedarf geladen

    Der System-Prompt enthält nur den Namen und die Beschreibung. Die Anweisungen werden bei der ersten passenden Anfrage geladen. Ein ungenutzter Skill verursacht daher keine Kosten.

  • Modell im laufenden Chat wechseln

    Da der Skill aus Anweisungen statt aus Code besteht, funktioniert er auch nach einem Modellwechsel — das nächste Modell liest dieselbe SKILL.md-Datei.

Skill-Anweisungen

Dies ist der Inhalt von SKILL.md, den das Modell lädt. Lesen Sie ihn vor der Installation — ein Skill besteht aus Anweisungen, denen Ihr Modell folgt.

Version Compatibility

Reference examples tested with: statsmodels 0.14+, scipy 1.12+, numpy 1.26+, pandas 2.1+. R packages cited: pwr, gsDesign (Anderson/Merck), gsDesign2, rpact (Wassmer/Brannath), presize, npsurvSS, nph, simtrial.

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.

Power and Sample Size for Clinical Trials

"Justify the trial's sample size" -> Compute the n needed to detect a pre-specified alternative δ with power 1-β at significance α, accounting for endpoint distribution, design (superiority/NI/equivalence), expected dropout, multiplicity, and stratification — and distinguish δ (the effect the trial is powered to detect) from MCID (the clinically meaningful difference).

The Foundational Distinction -- δ vs MCID

δ (the alternative effect): what the trial is powered to detect. Usually set above the MCID because sponsors want a strong signal that exceeds noise + design uncertainty.

MCID (Minimum Clinically Important Difference): the smallest effect size considered clinically meaningful. Jaeschke-Singer-Guyatt 1989 Control Clin Trials 10:407 (anchor-based) and Norman-Sloan-Wyrwich 2003 Med Care 41:582 ("the remarkable universality of half a standard deviation") established the modern conventions.

Confusing the two has produced both:

  • Underpowered trials where sponsor sets δ = MCID and gets a CI straddling zero
  • Overgenerous NI margins where sponsor sets M2 = full MCID (NI margin should be a fraction of MCID)

Postdoc rule of thumb: for superiority, δ >= 1.5 × MCID; for NI, M2 <= 0.5 × MCID.

Algorithmic Taxonomy

DesignFormula / approachSoftwareStrengthFails when
Two-sample t-test, continuousCohen's d; n = 2 × (z_α/2 + z_β)² / d²pwr::pwr.t.test (R); statsmodels.power.tt_ind_solve_power (Py)StandardHeteroscedasticity; non-normal outcomes
Two-sample proportions (Fleiss)Asymptotic normal approximation with/without continuity correctionpower.prop.test (R) -- uncorrected; pwr::pwr.2p.test; statsmodelsStandardn < 100/arm: continuity correction debate (D'Agostino 1988)
Survival (Schoenfeld 1981)events ≈ 4(z_α/2 + z_β)² / (log HR)² for 1:1gsDesign::nSurv; npsurvSS::size_two_armStandard PH-conformantPH violated (immuno-oncology) under-estimates by 20-50%
Survival under non-PH (Lakatos 1988)Markov chain accommodating time-varying HR, accrual, dropoutgsDesign::nSurv; npsurvSS; simtrialHandles immuno-oncology delayed effectsRequires explicit specification of HR(t) and accrual
MaxCombo SS under NPHSimulation-based; pre-specify weight familynphRCT; simtrialRobust to NPH patternComputationally heavier
Non-inferiority fixed-marginn = (z_α + z_β)² × variance / M²pwr::pwr.t2n.test adapted; rpact::getSampleSizeMeansPre-discounted MConstancy assumption violation invisible
Non-inferiority synthesisPool historical control-vs-placebo + current test-vs-controlgsDesign::ssTwoArmTestMore efficient than fixed-marginConstancy assumption MUST hold exactly
Equivalence TOSTTwo one-sided tests at α eachpwr::pwr.t.test adapted; presizeNo multiplicity adjustment neededWrong question when superiority/NI is intended
Group-sequentialLan-DeMets spending functionrpact; gsDesignInterim analyses; early stoppingMore complex SAP
Sample-size re-estimation (Mehta-Pocock)Promising-zone conditional powerrpact::getSampleSizeMeans with reestimationRecovers power if interim shows promiseUnblinded SSR scares FDA
Cluster-randomisedAdjust for design effect = 1 + (m-1)ICCclusterPower; pwr adaptedStandardICC misspecification

Postdoc reading list:

  • Fleiss JL 1981 Statistical Methods for Rates and Proportions (with/without continuity correction tables)
  • Schoenfeld DA 1981 Biometrika 68:316 (canonical TTE formula)
  • Lakatos E 1988 Biometrics 44:229 (Markov chain SS for complex survival)
  • Schuirmann DJ 1987 J Pharmacokinet Biopharm 15:657 (TOST)
  • Jaeschke R, Singer J, Guyatt GH 1989 Control Clin Trials 10:407 (MCID anchor-based)
  • Norman GR, Sloan JA, Wyrwich KW 2003 Med Care 41:582 (0.5 SD heuristic)
  • Snapinn SM 2000 Curr Control Trials Cardiovasc Med 1:19 (NI biocreep)
  • Temple R, Ellenberg SS 2000 Ann Intern Med 133:455 + 133:464 (NI assay sensitivity; Ann Intern Med NOT NEJM — common citation error)
  • Hung HMJ, Wang SJ, O'Neill RT 2005 Biom J (NI within-trial Type-I not guaranteed)
  • Mehta CR, Pocock SJ 2011 Stat Med 30:3267 (promising zone)
  • Lin RS, Lin J, Roychoudhury S et al 2020 Stat Biopharm Res (NPH Working Group)

Decision Tree by Scenario

ScenarioRecommended approachWhy
Continuous outcome, two-arm parallel, superiorityFleiss / Cohen's d formula via power.t.test or statsmodelsStandard; cite Fleiss 1981
Binary outcome, n > 100/armUncorrected normal approximation via power.prop.test; statsmodels power_proportions_2indepAdequate for n > 100
Binary outcome, n < 100/armFisher exact-based simulation OR Fleiss with continuity correctionContinuity correction debate; cite D'Agostino 1988 if uncorrected
Time-to-event with PHSchoenfeld 1981 via gsDesign::nSurvStandard; pre-specify hazards
Time-to-event under expected NPH (immuno-oncology)Lakatos 1988 OR simulation via simtrial::simtrial/nphRCTSchoenfeld under-estimates by 20-50%; cite Lin 2020
Non-inferiority continuousFixed-margin with M2 = 0.5 × historical M1 (discounted)FDA 2016 NI guidance; cite Temple-Ellenberg 2000
Non-inferiority binaryFixed-margin with Miettinen-Nurminen CI for RDCite EMA NI guidance; MN-CI standard
Bioequivalence (Cmax/AUC)TOST with 80-125% margins on geometric mean ratioFDA 1992 BE guidance; Schuirmann 1987
Cluster-randomisedn × design effect = 1 + (m-1)ICCCite Murray 1998 cluster RCT methodology
Group-sequentialLan-DeMets spending functionrpact or gsDesign
Pilot for sample size re-estimationBlinded SSR (Friede-Kieser 2006)No Type-I inflation; safer than unblinded
Promising-zone reestimationMehta-Pocock 2011 with pre-specified increase ruleRecovers power; cite caveat re Jennison-Turnbull 2015 critique

Continuous Outcomes -- Two-Sample t-Test

python
from statsmodels.stats.power import tt_ind_solve_power

# Solve for n per group
n = tt_ind_solve_power(
    effect_size=0.5,  # Cohen's d = (mu1 - mu2) / sigma
    alpha=0.05,
    power=0.80,
    alternative='two-sided'
)
print(f'n per arm = {np.ceil(n):.0f}')

# Solve for power given n
power = tt_ind_solve_power(effect_size=0.5, alpha=0.05, nobs1=100, alternative='two-sided')

Cohen's d benchmarks: small = 0.2, medium = 0.5, large = 0.8. Choose d to detect based on prior literature or clinically meaningful effect, NOT post-hoc to fit the affordable n.

Inflate for dropout: if dropout rate is q, multiply final n by 1/(1-q). For q=0.20, n_total = n/0.80.

Stratified randomisation efficiency: if randomisation stratifies on prognostic factors with combined R² = r against outcome, the effective n is n/(1-r²). Senn 2013 Stat Med 32:1439 makes the precision argument explicit.

Binary Outcomes -- The Continuity Correction Debate

python
from statsmodels.stats.power import NormalIndPower
import math

# Without continuity correction
p1, p2 = 0.30, 0.20
pbar = (p1 + p2) / 2
z_alpha = 1.96  # two-sided alpha=0.05
z_beta = 0.84   # power=0.80
n = ((z_alpha * math.sqrt(2 * pbar * (1 - pbar)) +
      z_beta * math.sqrt(p1 * (1 - p1) + p2 * (1 - p2))) / (p1 - p2)) ** 2
print(f'n per arm (uncorrected) = {math.ceil(n)}')

# Continuity-corrected (Fleiss formula)
correction = (1 + math.sqrt(1 + 4 / (n * abs(p1 - p2)))) ** 2 / 4
n_corrected = math.ceil(n * correction)
print(f'n per arm (continuity corrected) = {n_corrected}')

The continuity correction debate (D'Agostino, Chase & Belanger 1988 Am Stat 42:198):

  • Pro (Fleiss, Yates): better matches the exact distribution under H0
  • Con: overly conservative, wastes ~10% sample size; modern computing makes exact (Fisher-Irwin, Boschloo) tests feasible

R's power.prop.test uses uncorrected normal approximation — can over-state power 5-10% in small samples (n<100). For confirmatory work with n<100, use simulation-based SS via simr or presize.

Survival (Time-to-Event)

Schoenfeld 1981 -- the canonical formula

python
import math

# Events needed for two-sample log-rank under PH (Schoenfeld 1981)
from scipy.stats import norm

def schoenfeld_events(hr, alpha=0.05, power=0.80, allocation_ratio=1.0, two_sided=True):
    """
    events = (z_crit + z_beta)^2 / (p*(1-p) * log(HR)^2)

    where z_crit = z_{1-alpha/2} for two-sided test OR z_{1-alpha} for one-sided.
    """
    z_crit = norm.ppf(1 - alpha/2) if two_sided else norm.ppf(1 - alpha)
    z_beta = norm.ppf(power)
    p = 1 / (1 + allocation_ratio)
    return math.ceil((z_crit + z_beta) ** 2 / (p * (1 - p) * math.log(hr) ** 2))

# For HR=0.70, alpha=0.05 two-sided, 80% power, 1:1 -> approx 247 events
events_needed = schoenfeld_events(hr=0.70)
print(f'Events needed for HR=0.70: {events_needed}')

Events drive power, not subjects. Convert to n via expected event rate and follow-up:

python
# n needed = events / overall event probability over follow-up
expected_overall_event_prob = 0.40  # from pilot or historical
n_per_arm = math.ceil(events_needed / (2 * expected_overall_event_prob))
# Inflate for dropout
n_per_arm_with_dropout = math.ceil(n_per_arm / (1 - 0.15))  # 15% dropout

Lakatos 1988 -- complex survival

Use R gsDesign::nSurv() or npsurvSS::size_two_arm() for complex scenarios with:

  • Time-varying hazard ratios (delayed effect)
  • Non-uniform accrual
  • Different dropout rates per arm
  • Cure fractions
r
library(gsDesign)
n_lakatos <- nSurv(
    lambdaC = 0.04,     # control hazard per month
    hr = 0.70,           # treatment HR
    eta = 0.005,         # dropout hazard per month
    T = 24,              # total study duration in months
    minfup = 12,         # minimum follow-up
    accrualTime = 12,    # accrual duration
    alpha = 0.025,       # one-sided
    beta = 0.10          # power = 90%
)
print(n_lakatos)

Under non-PH (immuno-oncology with delayed effect)

Schoenfeld 1981 ASSUMES PH. Under immuno-oncology with delayed separation, the formula under-estimates required events by 20-50%. The fix:

r
# Simulate under expected hazard pattern (Lin 2020 NPH Working Group recommendation)
library(simtrial)
sim_result <- simtrial(
    n_per_arm = 250,
    enroll_rate = piecewise_enroll(),
    fail_rate = piecewise_fail(  # delayed-effect specification
        duration = c(6, 18),
        fail_rate = c(0.04, 0.04),  # control
        hr = c(1.0, 0.5),            # treatment HR is 1 for first 6 months, then 0.5
        dropout_rate = c(0.005, 0.005)
    ),
    total_duration = 36
)
# Compute empirical power via MaxCombo or weighted log-rank

Non-Inferiority Designs -- The FDA 2016 Framework

FDA NI Trials Guidance (November 2016) establishes the canonical M1/M2 framework:

  • M1 = entire effect of active control vs placebo (lower bound of CI from historical meta-analysis)
  • M2 = clinically acceptable loss, typically M1/2 (50% effect retention) but as conservative as M1/4 for mortality endpoints

The "double discount" trap: M2 = 0.5 × (lower CI bound of M1) effectively requires 50% retention of a discounted historical estimate, yielding a much tighter margin than naive point-estimate retention. This has effectively halted new antibiotic NDA development under stringent NI margins.

python
# Fixed-margin NI sample size (binary endpoint)
import math

p_control = 0.85         # historical/observed control success rate
p_test = 0.85            # null assumption: test = control (NI null is test - control < -M2)
margin_M2 = 0.05         # pre-specified clinically acceptable loss
z_alpha = 1.645          # one-sided alpha=0.025
z_beta = 0.84            # power=0.80

# Approximate: n per arm
variance_term = p_control * (1 - p_control) + p_test * (1 - p_test)
n = math.ceil((z_alpha + z_beta) ** 2 * variance_term / margin_M2 ** 2)
print(f'NI sample size per arm: {n}')

Use Miettinen-Nurminen score CI for RD (the regulatory standard) when computing the NI margin from observed proportions. Cite ratesci::scoreci (R) for production.

Constancy assumption: the historical placebo-vs-active effect must persist in the NI trial. If standard of care drifted, M1 over-estimates and margin is too liberal. Hung-Wang-O'Neill 2005 Biom J critique: NI trials have NO within-trial Type-I error guarantee — alpha is conditional on constancy.

Assay sensitivity (Temple-Ellenberg 2000 Ann Intern Med 133:455 + 133:464): NI trials have only external assay sensitivity (inferred from historical data + constancy); placebo-controlled trials have internal assay sensitivity. This is why NI trials are second-best when placebo is ethical.

Equivalence Designs and Bioequivalence

TOST (Two One-Sided Tests; Schuirmann 1987): reject H0 of inequivalence iff both one-sided tests reject at α each — equivalent to the 1-2α CI lying within (-δ, +δ). Closed under intersection-union -> no multiplicity adjustment needed despite two tests.

python
# TOST sample size for continuous outcome
import math

def tost_sample_size(mu_diff, sigma, margin, alpha=0.05, power=0.80):
    """Sample size per arm for TOST equivalence test."""
    z_alpha = 1.645  # one-sided
    z_beta = 0.84
    effect = abs(margin - abs(mu_diff))
    if effect <= 0:
        raise ValueError('|mu_diff| must be < margin')
    n = math.ceil(2 * sigma ** 2 * (z_alpha + z_beta) ** 2 / effect ** 2)
    return n

n_eq = tost_sample_size(mu_diff=0.0, sigma=10, margin=5)
print(f'Equivalence sample size per arm: {n_eq}')

FDA 1992 bioequivalence (80-125% rule): geometric mean ratio of Cmax and AUC must have 90% CI within (0.80, 1.25). Implemented in PowerTOST R package for crossover BE designs.

Crossover Designs -- Bioequivalence and Repeated-Measures

Crossover trials randomise each subject to receive both treatments in different periods. Power calculation is fundamentally different from parallel: the within-subject SD (sigma_w) drives power, not between-subject SD (sigma_b). With reasonable carryover-free designs, crossover requires ~25-50% the n of parallel for the same precision.

python
# Two-period crossover sample size (continuous endpoint)
import math

def crossover_n_continuous(mean_diff, sd_within, alpha=0.05, power=0.80):
    """n per sequence (so total n = 2*n) for two-period crossover."""
    z_alpha = 1.96  # two-sided
    z_beta = 0.84   # power=0.80
    n_per_seq = math.ceil(2 * (z_alpha + z_beta)**2 * sd_within**2 / mean_diff**2)
    return n_per_seq, 2 * n_per_seq  # n_per_seq, n_total

Bioequivalence (FDA 1992 / EMA 2010 framework)

Average bioequivalence: geometric mean ratio (GMR) of test/reference Cmax and AUC must have 90% CI within (0.80, 1.25). Log-transform pharmacokinetic parameters; analyse with mixed-effects ANOVA (period, sequence, treatment, subject random).

r
library(PowerTOST)
# Sample size for 2x2 crossover bioequivalence with CV (within-subject)
n_be <- sampleN.TOST(
    alpha = 0.05,
    targetpower = 0.80,
    theta0 = 0.95,        # expected GMR
    theta1 = 0.80,        # lower BE bound
    theta2 = 1.25,        # upper BE bound
    CV = 0.25,             # within-subject CV
    design = '2x2x2'      # standard 2-period 2-sequence
)
print(n_be)

Highly variable drugs (CV > 30%): standard 80-125% fails with feasible n. Use scaled average bioequivalence (SABE); the expanding-limits (ABEL) approach below is the EMA method (the FDA's reference-scaled RSABE uses a different criterion and PowerTOST::sampleN.RSABE()):

  • Reference-scaled limits: theta = exp(0.760 * sigma_WR) when sigma_WR > 0.294
  • Widens BE bounds proportional to within-subject variability of reference
  • PowerTOST::sampleN.scABEL() for sample size

Carryover assessment (Grizzle 1965)

Grizzle test for carryover: compares baseline-adjusted period 1 vs period 2 effects. Now controversial: the two-stage Grizzle carryover pretest is misleading -- it inflates the Type-I error of the treatment comparison (Freeman 1989 Stat Med 8:1421); significant "carryover" should drive design choice (washout extension), not an analysis switch (Senn 2002, Cross-over Trials in Clinical Research, 2nd ed.).

Modern operational rule: pre-specify adequate washout (>=5 half-lives); do NOT routinely test for carryover in primary analysis. If carryover is biologically plausible, use parallel design or extend washout.

Period effect

Period effects (calendar/learning) are estimable in 2x2 crossover. Standard analysis includes period as fixed effect:

r
library(nlme)
fit <- lme(response ~ treatment + period, random = ~1 | subject, data = df)

If period significant, treatment effect is still unbiased (orthogonal in balanced 2x2); report period effect for transparency.

Decision tree -- when crossover is appropriate

ScenarioUse crossover?Why
Bioequivalence of pharmacokinetic parametersYESStandard regulatory; within-subject precision much higher
Chronic stable disease (HTN, GERD, asthma)YESReversible response; ~50% sample size savings
Acute disease (sepsis, MI)NOCannot retreat same patient
Curative intent (oncology, surgery)NOTreatment alters disease state irreversibly
Long-half-life drug (>1 week)NOWashout impractical
Patient-reported outcomes with strong period biasCAUTIONPeriod bias may dominate

MCID -- Anchor-Based vs Distribution-Based

MethodSourceDescription
Anchor-basedJaeschke 1989Patient-reported anchor question; MCID = mean change in subjects who report "small important" change
1 SEM (Wyrwich 1999)J Clin EpidemiolMCID ≈ standard error of measurement
0.5 SD (Norman 2003)Med Care 41:582"Remarkable universality of half a standard deviation" across PROMs
0.5 SD baselineCommon rule of thumbQuick approximation for unknown PROMs

Postdoc rule: δ in power calculation should EXCEED MCID (often 1.5-2× MCID) so that trials are powered to detect effects clearly larger than the noise threshold.

Multiple Endpoints -- See multiplicity-graphical

For co-primary endpoints, power-adjust per FDA Multiple Endpoints Guidance (October 2022):

  • Co-primary (all-must-win): each endpoint at full alpha but joint power = product -> inflate n
  • Multiple primary (any-wins): alpha split (e.g., Bonferroni or graphical)
  • Hierarchical: test in order; if any fail, downstream cannot be claimed

Reconciliation: When Methods Disagree

PatternLikely causeAction
Schoenfeld n much smaller than Lakatos simulation nPH violated under expected HR(t) pattern (immuno-oncology delayed effect)Use Lakatos OR simulation under expected HR(t); cite Lin 2020 NPH Working Group
Continuity-corrected vs uncorrected proportion SS differ by ~10%Asymptotic approximation debate (D'Agostino 1988)For confirmatory n < 100/arm, use simulation-based SS; document correction approach in SAP
NI margin per FDA double discount (50% of M1 lower CI) vs sponsor proposed margin (50% of M1 point estimate)Sponsor uses point estimate; FDA expects lower-CI discountFDA 2016 NI guidance: M2 from lower CI bound is the regulatory expectation
Bayesian predictive probability of success vs frequentist power give different nBayesian integrates prior uncertainty; frequentist conditions on hypothesised δBayesian PPoS more honest about pre-trial uncertainty; frequentist preferred for confirmatory regulatory; report both for adaptive contexts
TOST and CI-inclusion approach give different equivalence conclusionsTOST is two-one-sided at α; CI is 1-2α — mathematically equivalent so should NOT disagreeIf disagree, check α conventions (Schuirmann 1987: TOST at α, CI at 1-2α)
Sponsor's MCID vs published anchor-based MCID differDifferent anchor questions or populationCite primary MCID source; cross-check with Norman 2003 0.5 SD heuristic; declare in SAP
Stratified-randomisation SS calculation vs unstratified differ substantiallyStratification efficiency gain via Senn 2013 formulaUse stratified formula; cite efficiency = 1/(1-r²) where r² is R² of strata against outcome
Cluster-RCT SS underpowered after enrollmentICC misspecified at design (most common SS failure in cluster RCTs)Use historical ICC + sensitivity analysis at ±50% of estimate; cite Murray 1998

Per-Method Failure Modes

Schoenfeld under non-PH

  • Trigger: Immunotherapy or other delayed-effect mechanism
  • Mechanism: Schoenfeld assumes constant log-HR
  • Symptom: Trial under-powered; observed events insufficient
  • Fix: Lakatos 1988 or simulation under expected HR(t); cite Lin 2020 NPH Working Group

Continuity correction debate

  • Trigger: Small-sample binary design
  • Mechanism: Uncorrected normal approx over-states power; corrected wastes ~10%
  • Symptom: Trial reach significance at lower n than expected
  • Fix: Use simulation-based SS for n<100; pre-specify correction approach in SAP

NI margin too liberal

  • Trigger: M2 set to MCID rather than 50% of historical M1
  • Mechanism: Allows clinically unacceptable inferiority within "non-inferior" CI
  • Symptom: Regulators flag margin as inappropriate at scientific advice
  • Fix: M2 <= 0.5 × MCID; M2 <= 0.5 × historical M1 lower bound (FDA double discount)

Constancy assumption violated

  • Trigger: NI trial with new standard of care differing from historical
  • Mechanism: M1 derived from historical data no longer reflects current control efficacy
  • Symptom: Active control performs worse than expected; "successful" NI may mask true inferiority
  • Fix: Synthesis approach with formal sensitivity to constancy; consider three-arm trial with small placebo

MCID confused with δ

  • Trigger: Sponsor sets δ = MCID in power calculation
  • Mechanism: Trial powered to detect smallest meaningful effect, with no margin for noise/dropout
  • Symptom: Effect estimate near MCID with wide CI straddling zero
  • Fix: δ >= 1.5 × MCID; document rationale in SAP

Promising-zone "stealth alpha inflation"

  • Trigger: Mehta-Pocock SSR applied without sufficient simulation
  • Mechanism: a naive unblinded increase analysed with the conventional (unweighted) statistic inflates Type-I error (Cui-Hung-Wang 1999); the pre-specified weighted CHW statistic preserves alpha
  • Symptom: Type-I inflation when the CHW weighting is dropped; separately, Jennison-Turnbull 2015 show the promising zone is inefficient -- the largest power gains per added patient lie outside it
  • Fix: Pre-specify increase rule transparently; report simulation operating characteristics

Unblinded SSR -- DMC firewall failure

  • Trigger: Interim effect estimate leaked beyond IDMC
  • Mechanism: Sponsor inference from sample-size increase decision reveals direction of interim effect
  • Symptom: Regulator audit reveals unblinding
  • Fix: Strict firewall; only "increase / no increase" communicated to sponsor; document SOP

Quantitative Thresholds

ThresholdSourceRationale
δ >= 1.5 × MCID for superiorityPostdoc rule; Norman 2003 implicationδ = MCID gives no margin for sampling variation
M2 <= 0.5 × historical M1 (FDA double discount)FDA NI 2016 guidanceConservative retention against biocreep
M2 <= 0.5 × MCID for NIStandard regulatory expectationAcceptable loss < clinically meaningful difference
Schoenfeld under non-PH under-estimates by 20-50%Lin 2020 NPH WGSwitch to Lakatos or simulation
Continuity correction wastes ~10% sample sizeD'Agostino, Chase & Belanger 1988 Am Stat 42:198Modern computing makes exact tests cheap
90% CI within (0.80, 1.25) for BEFDA 1992 BE guidanceGeometric mean ratio of Cmax/AUC
Unblinded SSR Type-I requires CHW weightsCui-Hung-Wang 1999Naive increase inflates Type-I
Promising-zone CP range ~30-80%Mehta-Pocock 2011 Stat Med 30:3267Mathematical calibration for Type-I preservation

Common Errors

Error / symptomCauseSolution
Trial under-powered for immunotherapySchoenfeld formula used under non-PHLakatos or simulation; cite Lin 2020
δ = MCID, CI straddles zeroδ-MCID confusionPre-specify δ >= 1.5 × MCID
NI "success" but active much worse than historicalConstancy violationCite Hung 2005; consider synthesis or 3-arm
Unblinded SSR with naive sample increaseType-I inflationCHW-weighted test; cite Cui-Hung-Wang 1999
power.prop.test over-states power n < 100Uncorrected normal approximationSimulation-based SS or Fleiss continuity correction
BE failure after large n with point estimate near 1.0Variability higher than assumedRe-estimate from pilot; consider replicate design for highly variable drugs
Promising-zone tipping to favourable not pre-specifiedOperational confusionDocument increase rule in SAP; pre-specify cap
Cluster RCT n based on individual-levelDesign effect ignoredn × (1 + (m-1)ICC); cite Murray 1998
TOST sample size with non-zero true differenceTreating null as abs(mu_diff)=0Include realistic mu_diff in calculation

Anticipated Reviewer Pushback

PushbackResponse
"Is δ realistic?"Justified from prior phase 2; δ exceeds MCID by factor X; pre-specified
"Why this NI margin?"M2 = 50% of historical lower-CI M1 per FDA 2016 double discount; M2 < MCID
"Constancy assumption?"Reviewed historical placebo-vs-active effect over time; stable; sensitivity to lower-end constancy provided
"Schoenfeld vs Lakatos?"PH plausible from phase 2 KM; pre-specified Schoenfeld; Lakatos simulation under expected delayed-effect as sensitivity
"Continuity correction?"n > 200/arm; uncorrected normal approximation valid (Fleiss 1981)
"Bioequivalence variability assumption?"Conservative (upper bound of historical CV); pilot will trigger re-estimation if CV >X%
"Cluster ICC source?"Historical ICC from prior cluster trial in similar setting; sensitivity at ICC ±50% provided
"MCID source?"Anchor-based MCID from validation study (Jaeschke 1989); supported by 0.5 SD heuristic (Norman 2003)
"Promising zone or just blinded SSR?"Promising zone with pre-specified CP boundaries; CHW weights for Type-I control

References

  • Cui L, Hung HMJ, Wang SJ. 1999. Modification of sample size in group sequential clinical trials. Biometrics 55:853-857.
  • D'Agostino RB, Chase W, Belanger A. 1988. The appropriateness of some common procedures for testing the equality of two independent binomial populations. Am Stat 42:198-202.
  • FDA. 2016. Non-Inferiority Clinical Trials to Establish Effectiveness. Final Guidance.
  • FDA. 2022. Multiple Endpoints in Clinical Trials. Final Guidance.
  • Fleiss JL. 1981. Statistical Methods for Rates and Proportions (2nd ed). Wiley.
  • Friede T, Kieser M. 2006. Sample size recalculation in internal pilot study designs. Biom J 48:537-555.
  • Hung HMJ, Wang SJ, O'Neill RT. 2005. A regulatory perspective on choice of margin and statistical inference issue in non-inferiority trials. Biom J 47:28-36.
  • Jaeschke R, Singer J, Guyatt GH. 1989. Measurement of health status: ascertaining the minimal clinically important difference. Control Clin Trials 10:407-415.
  • Lakatos E. 1988. Sample sizes based on the log-rank statistic in complex clinical trials. Biometrics 44:229-241.
  • Lin RS, Lin J, Roychoudhury S, Anderson KM, Hu T, Huang B, Leon LF, Liao JJZ, Liu R, Luo X, Mukhopadhyay P, Qin R, Tatsuoka K, Wang X, Wang Y, Zhu J, Chen TT, Iacona R. 2020. Alternative analysis methods for time to event endpoints under nonproportional hazards: a comparative analysis. Stat Biopharm Res.
  • Mehta CR, Pocock SJ. 2011. Adaptive increase in sample size when interim results are promising. Stat Med 30:3267-3284.
  • Norman GR, Sloan JA, Wyrwich KW. 2003. Interpretation of changes in health-related quality of life: the remarkable universality of half a standard deviation. Med Care 41:582-592.
  • Schoenfeld DA. 1981. The asymptotic properties of nonparametric tests for comparing survival distributions. Biometrika 68:316-319.
  • Schuirmann DJ. 1987. A comparison of the two one-sided tests procedure and the power approach for assessing the equivalence of average bioavailability. J Pharmacokinet Biopharm 15:657-680.
  • Senn S. 2013. Seven myths of randomisation in clinical trials. Stat Med 32:1439-1450.
  • Snapinn SM. 2000. Noninferiority trials. Curr Control Trials Cardiovasc Med 1:19-21.
  • Temple R, Ellenberg SS. 2000. Placebo-controlled trials and active-control trials in the evaluation of new treatments, part 1: ethical and scientific issues. Ann Intern Med 133:455-463.
  • Ellenberg SS, Temple R. 2000. Placebo-controlled trials and active-control trials in the evaluation of new treatments, part 2: practical issues and specific cases. Ann Intern Med 133:464-470.
  • Wyrwich KW, Tierney WM, Wolinsky FD. 1999. Further evidence supporting an SEM-based criterion for the identification of meaningful intra-individual changes in health-related quality of life. J Clin Epidemiol 52:861-873.

Related Skills

  • clinical-biostatistics/survival-analysis - TTE-specific sample size (Schoenfeld, Lakatos, simulation)
  • clinical-biostatistics/effect-measures - δ on OR/RR/RD scales
  • clinical-biostatistics/categorical-tests - Binary endpoint test selection
  • clinical-biostatistics/multiplicity-graphical - Power adjustment for co-primary endpoints
  • clinical-biostatistics/adaptive-designs - SSR, promising zone, group-sequential
  • clinical-biostatistics/bayesian-trials - Bayesian SS via predictive probability of success
  • clinical-biostatistics/trial-reporting - CONSORT 2025 item 16a (sample size justification)
  • experimental-design/sample-size - General sample-size methods
  • experimental-design/power-analysis - General power methods

Mitgelieferte Dateien

Das Modell liest diese Dateien bei Bedarf, während der Skill geladen ist. Sie werden als lesbare Dateien bereitgestellt und niemals ausgeführt.

Häufig gestellte Fragen

Was macht der KI-Skill Bio Clinical Biostatistics Power Sample Size?

Berechnet Stichprobengröße und Power für klinische Studien mit kontinuierlichen, binären und Zeit-bis-Ereignis-Endpunkten sowie für Überlegenheits-, Nichtunterlegenheits- und Äquivalenzdesigns. Berücksichtigt die FDA-Leitlinien von 2016 zur Wahl der Nichtunterlegenheitsmarge mit dem M1/M2-Rahmen, Schoenfeld 1981 und Lakatos 1988 für Überlebenszeitanalysen, Schuirmann TOST und 80–125 % Bioäquivalenz sowie die Abgrenzung zwischen klinisch relevantem Mindestunterschied (MCID) und δ. Nutzen Sie diesen Skill, um die Studiengröße im Prüfplan oder SAP gemäß CONSORT 2025, Punkt 16a, zu begründen.

Warum Bio Clinical Biostatistics Power Sample Size in TypingMind nutzen?

Weil Sie den Skill einmal installieren und mit jedem Modell verwenden können. Bio Clinical Biostatistics Power Sample Size besteht aus reinem Markdown statt aus anbieterspezifischem Code. So funktioniert derselbe Skill mit GPT-5, Claude, Gemini, Grok oder einem lokalen Modell – und Sie können das Modell mitten im Chat wechseln, ohne dass der Skill seine Funktion verliert. TypingMind verwendet Ihre eigenen API-Schlüssel. Sie bezahlen die Anbieter daher direkt statt über ein Abonnement pro Nutzerplatz, und Ihre Skills und Chats bleiben in Ihrem eigenen Speicher.

Wie installiere ich Bio Clinical Biostatistics Power Sample Size in TypingMind?

Öffnen Sie in TypingMind Plugins → Skills → Von GitHub installieren und fügen Sie https://github.com/PKU-YuanGroup/OpenAI4S/tree/main/skills/bioskills/bio-clinical-biostatistics-power-and-sample-size ein. TypingMind liest die Datei SKILL.md, bündelt die zugehörigen Dateien und installiert alles als Skill, den Sie für jeden Chat einzeln aktivieren können.

Welche KI-Modelle können Bio Clinical Biostatistics Power Sample Size nutzen?

Jedes Modell, das Sie mit TypingMind verbinden. KI-Skills bestehen aus reinen Markdown-Anweisungen statt aus anbieterspezifischem Code. Daher können GPT, Claude, Gemini, Grok und lokale Modelle diesen Skill laden, wenn eine Anfrage dazu passt.

Wie viele KI-Modelle kann ich mit Bio Clinical Biostatistics Power Sample Size verwenden?

So viele Sie möchten. In TypingMind können Sie Bio Clinical Biostatistics Power Sample Size mit jedem Modell verwenden, das Skills unterstützt, etwa mit GPT, Claude, Gemini, Grok, DeepSeek, Mistral oder Llama. Dabei nutzen Sie Ihre eigenen API-Schlüssel.

Ist der KI-Skill Bio Clinical Biostatistics Power Sample Size kostenlos?

Ja. Der Skill wird von PKU-YuanGroup auf GitHub unter der Lizenz MIT veröffentlicht. Sie bezahlen nur Ihren eigenen KI-Anbieter für die verwendeten Token.

Was sind KI-Skills?

Ein KI-Skill ist ein wiederverwendbares Anweisungspaket, das einem KI-Modell vermittelt, wie es eine bestimmte Aufgabe erledigt. Es folgt dem offenen Format Agent Skills: Die Datei SKILL.md enthält den Namen und die Beschreibung des Skills. Hinzu kommen bei Bedarf Skripte, Vorlagen oder Referenzdateien für das Modell. Das Modell liest die Anweisungen nur, wenn Ihre Anfrage zum Skill passt. Ein installierter Skill verursacht daher erst Kosten, wenn er verwendet wird.

Wie unterscheiden sich KI-Skills von Plugins oder MCP-Servern?

Ein Plugin oder MCP-Server stellt einem Modell neue aufrufbare Tools bereit – Code, der auf einem System ausgeführt wird und ein Ergebnis zurückgibt. Ein KI-Skill vermittelt dem Modell stattdessen Wissen und Vorgehensweisen: wie es eine Aufgabe angeht, welche Schritte es befolgt und wie eine gute Ausgabe aussieht. Skills bestehen aus reinem Markdown und kommen daher ohne Server, API-Schlüssel und Laufzeitumgebung aus. Sie funktionieren mit jedem Modell.

Alle anzeigen

Jetzt eigenen KI-Arbeitsbereich einrichten

Abonnieren Sie unseren Newsletter und erfahren Sie mehr über neue Funktionen und kommende Gewinnspiele 👇