Decompose Tested

/vera-clinical-trial-designing

Sample size calculation for clinical trials with binary, continuous, or time-to-event primary endpoints. Single-arm and 1:1 controlled designs. Built by Vera.

Source Veronica0206/vera-clinical-trial-designing
Compatible with claude-code
Last updated May 4, 2026
Tags
biostatisticssample-sizeschoenfeldlog-rankt-testclinical-trialsphase-2phase-3

A focused sample size calculator for biostatisticians designing clinical trials. Public-release scope: implements the standard textbook methods every biostat student and working scientist needs, in a clean parameterization-and-execution pattern that drops into a Claude Code workflow. Built by Vera and battle-tested in pharma R&D before being released as an open-source skill.

What it does

EndpointSingle-armControlled (1:1)
BinaryExact binomialZ-test unpooled
ContinuousOne-sample t-testTwo-sample t-test
Time-to-eventExponential rateSchoenfeld log-rank

Outputs a sample size table (CSV) across a configurable alpha × power grid and a power-vs-N curve (PDF). Base R only — no external packages required.

What it does not do

These are intentionally out of scope and listed in the skill’s Beyond This Skill section with primary references:

  • Bayesian Go/No-Go decision frameworks
  • Pre-trial assurance (PPOS) for Phase 2 → Phase 3 transitions
  • 2:1 (or other unequal) randomization
  • Poisson sample size for incidence-rate endpoints
  • Unconditional exact (Barnard-type) tests
  • Frequentist post-trial decision analysis
  • Operating-characteristics simulation across true-parameter grids

If your design needs any of those, treat this skill’s output as a baseline.

Who it’s for

  • Biostatisticians producing a first-pass sample size table for a study protocol or design discussion.
  • Clinical scientists validating a CRO’s calculation or running a quick sensitivity check.
  • PhD / MS holders entering biostat roles who want a clean reference implementation that matches the conventions taught in standard texts.

Tested

Yes — built by a working biostatistician for internal use, then trimmed to a public-scope subset before release. The full internal version is preserved on the v1.0-internal git tag.

Verdict

The skill structures execution. Endpoint selection, H0/H1 parameterization, and regulatory defense remain the biostatistician’s responsibility — and that’s the point.