METHODS · VERSION 1.0.0
Methods, assumptions and limits
These are planning results. Design selection and assumptions come before calculation.
| Design | Implementation |
|---|---|
| Two independent means | Noncentral t, common variance; integer nE and nC. |
| One mean / paired means | Noncentral t; paired calculations use the SD of differences and participants with both measurements. |
| Two proportions | Normal threshold with pooled variance and power with unpooled variance. No continuity correction. |
| One-sided exact binomial | Searches n from 1 to 5000 sequentially using binomial tails. Reports the critical region and actual α. |
| Non-inferiority: means | Normal; benefit-oriented hypothesis. Positive margin and E−C difference. One-sided α. |
| Non-inferiority: proportions | Wald approximation. Does not implement Farrington–Manning or an exact method. |
| Equivalence: means | Normal TOST with symmetric ±Δ margins. Each test uses the specified α. Not exact t bioequivalence. |
| Survival | Schoenfeld events and an event fraction. Proportional hazards; no accrual or follow-up model. |
| Proportion precision | Inverts Wilson half-width at the planning p. Not an assurance of realized width. |
| Mean precision | Normal CI with specified SD; does not account for SD uncertainty. |
| Clustered means | Normal, 1:1 allocation, equal sizes, DE=1+(m−1)ICC. No small-cluster-count or unequal-size adjustment. |
Rounding and attrition
The ratio is nControl/nExperimental; each group is rounded upward. Attrition is applied per arm as ceil(n/(1−f)). For clusters, recruitment is rounded again to whole clusters of the specified size; this is a recruitment approximation, not a separate model of site dropout. For survival, avoid counting losses twice if already included in the event fraction.
Numerical accuracy is not design suitability
t-test power uses jStat 1.9.6. Above 20,000 degrees of freedom a normal limit is used and disclosed on screen. Cases beyond the numerical range are rejected. Methods labeled normal are approximations even when the search finds a minimum integer n. Binomial powers fluctuate with n, so the exact search is sequential. Do not reuse its critical region with a different sample size.
Does not cover adaptive or sequential designs, multiplicity, MMRM/ANCOVA, non-proportional-hazards survival, crossover bioequivalence or exact binomial non-inferiority. It does not incorporate uncertainty in effect size or margin. The study statistician must review the rationale for the final design.
Technical references
- R stats — power.t.test
- R stats — power.prop.test
- R stats — binomial distribution
- R stats — score intervals; Wilson (1927)
- Schoenfeld (1983) — Sample-size formula for the proportional-hazards regression model
- Sealed Envelope — continuous non-inferiority formula
- Sealed Envelope — continuous equivalence
- jStat 1.9.6 — numerical library, MIT license