Method document
Sample size to estimate a hazard ratio per standard deviation
How many participants are needed to estimate the hazard ratio per standard deviation of a numerical predictor from a Cox model within a chosen factor, from the survival expected at the end of follow-up. Allows for other covariates. Covers non-response.
https://statwisely.com/methods/precision-hr-per-sd/
When to use it
- A prognostic cohort reporting the hazard ratio of a biomarker or another measured factor, with its interval.
Not for
- Showing that the predictor matters at all. Use Cox regression with a numerical predictor under “Detect an effect”.
Notation
- Number of participants
- Survival at the end of follow-up for someone at the predictor’s mean
- Expected hazard ratio per SD; 1 if not given
- Expected Cox information about the log hazard ratio per SD, per participant
- Share of the predictor’s variance explained by the other covariates
- Precision factor: the interval runs from HR / f to HR × f
- Standard normal quantile for confidence 1 − α (1.960 for 95%)
- Non-response rate
Formulas
Participants from the Cox information
Each event contributes the variance of the covariate among those still at risk, weighted by their hazard; I integrates that over follow-up, with exponential survival censored at its end. At a hazard ratio of 1 it is Var(x) times the share with an event: Schoenfeld’s π₁π₂ for two groups [1] and 1 per SD [2].
Non-response
The number to approach so that n respond. Applied last, after any clustering.
Parameters
Confidence level
Values: 90%, 95% or 99%
95% is the convention in health research. A higher level widens the interval, so the same margin needs a larger sample.
Precision factor
Values: Above 1; 1.25 means the interval runs from HR / 1.25 to HR × 1.25
A rare event leaves few events to learn from, so it needs many participants for any factor.
Survival at the predictor’s mean
Values: Between 0 and 1
The share expected to be event-free at the end of follow-up for someone at the average predictor value.
Expected hazard ratio per SDOptional
Values: Above 0; 1 if left blank
A strong effect shifts events towards those with high values, which changes the information a little.
R² of the predictor on the other covariatesOptional
Values: At least 0 and below 1
0 with no other covariates.
Expected non-response rateOptional
Values: 0% up to, but not including, 100%
The share of people approached who will not take part; use the response rate of a comparable study. Approaching more people restores the number of respondents, not their representativeness: if non-responders differ, the estimate can still be biased.
Assumptions
- The predictor is roughly normal, and the log hazard changes linearly with it.
- Hazards are proportional; survival is exponential and censored only at the end of a common follow-up period.
- Non-response is unrelated to the outcome.
Worked examples
30% with an event
0.7 event-free at the mean, factor 1.25: I = 0.30, so n = 1.96² / (0.30 × (ln 1.25)²) = 257.2, rounded up to 258.
Sample size: 258
Open this example in the calculatorPlanning at the expected effect
Expecting HR = 1.3 per SD, more events occur among those with high values: I = 0.302, so n = 256.
Sample size: 256
Open this example in the calculatorAdjusting for related covariates
If the other covariates explain 0.2 of the predictor’s variance: 257.2 / 0.8 = 321.5, so n = 322.
Sample size: 322
Open this example in the calculatorValidation
- Every worked example on this page is recomputed by the StatWisely engine whenever the software is built. If a number or formula here stopped matching the calculator, the release would be stopped until this document was corrected.
- At no effect the information equals the share with an event, Hsieh and Lavori’s form: 1.96² / (ln 1.25)² = 77.1 events at 30%. Cox models fitted to simulated samples at the planned sizes gave median interval factors within 0.2% of the target and coverage of 94% to 96%. An independent implementation in R recomputes these sizes and is compared with the engine’s.
How to cite
StatWisely. Sample size to estimate a hazard ratio per standard deviation. Method document, engine version 1.0.0, reviewed 2026-10-09. https://statwisely.com/methods/precision-hr-per-sd/
Cite the original references for the formulas your design uses as well.
References
- 1.Schoenfeld DA. Sample-size formula for the proportional-hazards regression model. Biometrics. 1983;39(2):499–503.
- 2.Hsieh FY, Lavori PW. Sample-size calculations for the Cox proportional hazards regression model with nonbinary covariates. Controlled Clinical Trials. 2000;21(6):552–560.