Specialized Sample Size (Survival / Diagnostic / Non-inferiority)
Sample-size estimation for common specialized study designs: survival studies (log-rank/Cox, Schoenfeld's formula for required number of events), diagnostic tests (target precision for sensitivity/specificity), and non-inferiority/equivalence trials (means or proportions). For basic sample sizes of a general mean/proportion/correlation see the Sample Size Calculator. Computed locally in your browser.
Estimates the number of events required for a log-rank/Cox test by Schoenfeld's formula; if a total event probability is entered, it is further converted to the required total sample.
How to use & methodology
Why compute the number of events first in a survival study?
The power of log-rank/Cox is determined by the "number of events" rather than the sample size. Schoenfeld's formula first gives the required number of events, then combines it with the expected event probability (affected by follow-up duration, accrual rate, baseline event rate) to convert to the total sample size.
Why is diagnostic sample size split into two parts?
Sensitivity is estimated only among diseased patients and specificity only among non-diseased. Each precision requirement must be met separately, then converted to a total sample by prevalence and the larger taken, ensuring both metrics reach the target precision.
How is the non-inferiority margin set?
The margin is the maximum clinically acceptable inferiority and should have a clear clinical basis and comply with regulatory guidance, usually conservative. It directly determines sample size — the smaller the margin, the larger the required sample.
Should sample be added for loss to follow-up?
Yes. The results above exclude dropout. Actual enrollment ≈ computed value ÷ (1 − expected dropout rate). For example, with an expected 15% dropout, divide the sample size by 0.85.